-
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 1) this can be a dict and dicts - that way you can avoid if - else if chain logic.
scehd_handlers = {"GET", get_schedule_backup_info, "DELETE",remove_backup_cron_job}
handlers = {"schedule", sched_handlers }
then use the path and method to get the function handlers.
AA-2487: Backend - Enable Scheduled Backups
Review Request #743 — Created March 26, 2025 and updated
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_3_7 | |
| AA-2487 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
Define backup schedules (e.g., daily, weekly, monthly, yearly).
Solution
Have made changes to schedule backup daily, weekly, monthly, yearly
Introduced new API's
POST backup/schedule - To schedule backup
GET backup/schedule - Get schedule backup info
DEL backup/schedule - Removes schedule backup
POST https://192.168.162.162:8888/backup/schedule
request:
{
"frequency": "daily",
"time": "09:20"
}Response:
{
"cron_time": "20 09 * ",
"message": "Backup schedule updated successfully!"
}GET https://192.168.162.162:8888/backup/schedule
Response:
{
"month": null,
"day_of_the_month": "09:20",
"day_of_the_week": null,
"frequency": 2,
"time": "daily"
}DELETE https://192.168.162.162:8888/backup/schedule
Response:
{
"message": "Successfully removed the backup schedule!"
}
| Description | From | Last Updated |
|---|---|---|
|
this can be a dict and dicts - that way you can avoid if - else if chain logic. scehd_handlers … |
|
|
|
This the same request approach we have for the Report Generation Cron Jobs? if not can we adopt that. |
|
|
|
These HttpResponse will return the http status code as 200 and within the response body shows the content with error … |
|
|
|
Do we need a main()? |
|
|
|
typo: specifies =? specified. |
|
|
|
same here.. |
|
|
|
same here.. |
|
-
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 2) This the same request approach we have for the Report Generation Cron Jobs? if not can we adopt that.
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 2) These HttpResponse will return the http status code as 200 and within the response body shows the content with error code 405 is this fine? or we cand use the code at the HTTP level also?
-
Diff: |
Revision 3 (+344 -37)
|
|---|
-
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 3) typo: specifies =? specified.
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 3) same here..
-
branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py (Diff revision 3) same here..
Diff: |
Revision 4 (+344 -37)
|
|---|
