Closed ShahriyarR closed 3 years ago
✅ Merging this PR will increase code quality in the affected files by 0.68%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 15.34 🙂 | 15.08 🙂 | -0.26 👍 |
Method Length | 89.89 🙂 | 90.00 🙂 | 0.11 👎 |
Working memory | 38.22 ⛔ | 38.04 ⛔ | -0.18 👍 |
Quality | 42.87% 😞 | 43.55% 😞 | 0.68% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 243 | 242 | -1 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
autoxtrabackup.py | 42.87% 😞 | 43.55% 😞 | 0.68% 👍 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
autoxtrabackup.py | all_procedure | 25 😞 | 552 ⛔ | 63 ⛔ | 12.46% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
autoxtrabackup.py | check_file_content | 6 ⭐ | 74 🙂 | 18 ⛔ | 55.96% 🙂 | Extract out complex expressions |
The emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.
Please see our documentation here for details on how these metrics are calculated.
We are actively working on this report - lots more documentation and extra metrics to come!
Let us know what you think of it by mentioning @sourcery-ai in a comment.
As a basic draft now we are able to take a backup from docker container. The flow is as below:
$ curl -X POST localhost:80/backup
{"result":"Successfully finished the backup process"}
Inside docker container:
root@shako-ThinkPad:/app# ls ~/XB_TEST/backup_dir/full/
2020-11-15_09-58-43
root@shako-ThinkPad:/app# ls ~/XB_TEST/backup_dir/inc/
2020-11-15_09-59-29 2020-11-15_09-59-52 2020-11-15_10-00-10
The next is to implement proper error handling sending backup error codes etc. Then make an endpoint for preparing backup /prepare.
Fixes #418