Skip to content

Commit 1b35e2b

Browse files
committed
Prevent running recover out of docker mode
1 parent 1d8184b commit 1b35e2b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rqd/rqd/rqcore.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,13 @@ def __init__(self, optNimbyoff=False):
106106

107107
self.backup_cache_path = None
108108
if rqd.rqconstants.BACKUP_CACHE_PATH:
109-
self.backup_cache_path = rqd.rqconstants.BACKUP_CACHE_PATH
110-
if not os.path.exists(os.path.dirname(self.backup_cache_path)):
111-
os.makedirs(os.path.dirname(self.backup_cache_path))
109+
if not rqd.rqconstants.RUN_ON_DOCKER:
110+
log.warning("Cache backup is currently only available "
111+
"when RUN_ON_DOCKER mode")
112+
else:
113+
self.backup_cache_path = rqd.rqconstants.BACKUP_CACHE_PATH
114+
if not os.path.exists(os.path.dirname(self.backup_cache_path)):
115+
os.makedirs(os.path.dirname(self.backup_cache_path))
112116

113117
signal.signal(signal.SIGINT, self.handleExit)
114118
signal.signal(signal.SIGTERM, self.handleExit)

0 commit comments

Comments
 (0)