Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Dec 18, 2024
1 parent 96c52ce commit 65ddb09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libqmpbackup/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
the LICENSE file in the top-level directory.
"""

VERSION = "0.44-noevent"
VERSION = "0.45-noevent"
10 changes: 6 additions & 4 deletions qmpbackup
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ async def cancel_jobs(qmp, log):
if limit >= retry:
log.warning("Unable to stop all jobs within %s seconds.", retry)
return

jobs = await qmp.execute("query-block-jobs")
if len(jobs) == 0:
log.info("All jobs stopped")
return

for job in jobs:
jobs = await qmp.execute("query-block-jobs")
if len(jobs) == 0:
log.info("All jobs stopped")
return
if job["type"] != "backup" or not job["device"].startswith("qmpbackup"):
continue
try:
Expand Down

0 comments on commit 65ddb09

Please sign in to comment.