Skip to content

Commit

Permalink
Add backup flag validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
everaldorodrigo committed Sep 27, 2024
1 parent 3ac2127 commit ae0b16d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def routine(no_backup=False, format="zip"):
logger.warning("Schedule lock acquired by another process. No need to run it in this process.")
except Exception as e:
logger.error(f"An error occurred during the routine: {e}")
logger.error("Stack trace:", exc_info=True)
finally:
if lock_acquired:
_lock.release()
Expand Down
3 changes: 2 additions & 1 deletion src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
from tornado.web import RequestHandler

from admin import routine
from config_key import NO_BACKUP
from utils.indices import setup


def run_routine():
thread = Thread(target=routine, daemon=True)
thread = Thread(target=routine, kwargs={"no_backup": NO_BACKUP}, daemon=True)
thread.start()


Expand Down

0 comments on commit ae0b16d

Please sign in to comment.