Skip to content

Commit

Permalink
Prevent running recover out of docker mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares committed Dec 10, 2024
1 parent 1d8184b commit 1b35e2b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rqd/rqd/rqcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,13 @@ def __init__(self, optNimbyoff=False):

self.backup_cache_path = None
if rqd.rqconstants.BACKUP_CACHE_PATH:
self.backup_cache_path = rqd.rqconstants.BACKUP_CACHE_PATH
if not os.path.exists(os.path.dirname(self.backup_cache_path)):
os.makedirs(os.path.dirname(self.backup_cache_path))
if not rqd.rqconstants.RUN_ON_DOCKER:
log.warning("Cache backup is currently only available "
"when RUN_ON_DOCKER mode")
else:
self.backup_cache_path = rqd.rqconstants.BACKUP_CACHE_PATH
if not os.path.exists(os.path.dirname(self.backup_cache_path)):
os.makedirs(os.path.dirname(self.backup_cache_path))

signal.signal(signal.SIGINT, self.handleExit)
signal.signal(signal.SIGTERM, self.handleExit)
Expand Down

0 comments on commit 1b35e2b

Please sign in to comment.