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 62
62
# built documents.
63
63
#
64
64
# The short X.Y version.
65
- version = "{}" . format ( VERSION )
65
+ version = f" { VERSION } "
66
66
# The full version, including alpha/beta/rc tags.
67
- release = "{}" . format ( VERSION )
67
+ release = f" { VERSION } "
68
68
69
69
# The language for content autogenerated by Sphinx. Refer to documentation
70
70
# for a list of supported languages.
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ async def home() -> RedirectResponse:
28
28
)
29
29
async def backup () -> JSONResponse :
30
30
backup_ = Backup ()
31
- result = backup_ .all_backup ()
32
- if result :
31
+ if result := backup_ .all_backup ():
33
32
return JSONResponse (
34
33
content = {"result" : "Successfully finished the backup process" },
35
34
status_code = status .HTTP_201_CREATED ,
@@ -48,8 +47,7 @@ async def backup() -> JSONResponse:
48
47
)
49
48
async def prepare () -> JSONResponse :
50
49
prepare_ = Prepare ()
51
- result = prepare_ .prepare_inc_full_backups ()
52
- if result :
50
+ if result := prepare_ .prepare_inc_full_backups ():
53
51
return JSONResponse (
54
52
content = {"result" : "Successfully prepared all the backups" },
55
53
status_code = status .HTTP_200_OK ,
@@ -68,10 +66,9 @@ async def prepare() -> JSONResponse:
68
66
)
69
67
async def backups () -> JSONResponse :
70
68
backup_ = Backup ()
71
- result = list_available_backups (
69
+ if result : = list_available_backups (
72
70
str (backup_ .builder_obj .backup_options .get ("backup_dir" ))
73
- )
74
- if result :
71
+ ):
75
72
return JSONResponse (content = {"backups" : result }, status_code = status .HTTP_200_OK )
76
73
return JSONResponse (content = {"backups" : {}}, status_code = status .HTTP_200_OK )
77
74
You can’t perform that action at this time.
0 commit comments