This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
mysql_autoxtrabackup/api/controller Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 6262# built documents.
6363#
6464# The short X.Y version.
65- version = "{}" . format ( VERSION )
65+ version = f" { VERSION } "
6666# The full version, including alpha/beta/rc tags.
67- release = "{}" . format ( VERSION )
67+ release = f" { VERSION } "
6868
6969# The language for content autogenerated by Sphinx. Refer to documentation
7070# for a list of supported languages.
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ async def home() -> RedirectResponse:
2828)
2929async def backup () -> JSONResponse :
3030 backup_ = Backup ()
31- result = backup_ .all_backup ()
32- if result :
31+ if result := backup_ .all_backup ():
3332 return JSONResponse (
3433 content = {"result" : "Successfully finished the backup process" },
3534 status_code = status .HTTP_201_CREATED ,
@@ -48,8 +47,7 @@ async def backup() -> JSONResponse:
4847)
4948async def prepare () -> JSONResponse :
5049 prepare_ = Prepare ()
51- result = prepare_ .prepare_inc_full_backups ()
52- if result :
50+ if result := prepare_ .prepare_inc_full_backups ():
5351 return JSONResponse (
5452 content = {"result" : "Successfully prepared all the backups" },
5553 status_code = status .HTTP_200_OK ,
@@ -68,10 +66,9 @@ async def prepare() -> JSONResponse:
6866)
6967async def backups () -> JSONResponse :
7068 backup_ = Backup ()
71- result = list_available_backups (
69+ if result : = list_available_backups (
7270 str (backup_ .builder_obj .backup_options .get ("backup_dir" ))
73- )
74- if result :
71+ ):
7572 return JSONResponse (content = {"backups" : result }, status_code = status .HTTP_200_OK )
7673 return JSONResponse (content = {"backups" : {}}, status_code = status .HTTP_200_OK )
7774
You can’t perform that action at this time.
0 commit comments