Skip to content

Commit 4d31c39

Browse files
committed
Allow config override for backup constants
1 parent 991f309 commit 4d31c39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rqd/rqd/rqconstants.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
# pylint: disable=wrong-import-position
2424
from future import standard_library
25+
from six import _K
2526
standard_library.install_aliases()
2627
# pylint: enable=wrong-import-position
2728

@@ -164,7 +165,7 @@
164165

165166
# Backup running frames cache. Backup cache is turned off if this path is set to
166167
# None or ""
167-
BACKUP_CACHE_PATH = "/tmp/opencue/running_frames_backup.dat"
168+
BACKUP_CACHE_PATH = ""
168169
BACKUP_CACHE_TIME_TO_LIVE_SECONDS = 60
169170

170171
try:
@@ -248,6 +249,11 @@
248249
if config.has_section(__host_env_var_section):
249250
RQD_HOST_ENV_VARS = config.options(__host_env_var_section)
250251

252+
if config.has_option(__override_section, "BACKUP_CACHE_PATH"):
253+
BACKUP_CACHE_PATH = config.get(__override_section, "BACKUP_CACHE_PATH")
254+
if config.has_option(__override_section, "BACKUP_CACHE_TIME_TO_LIVE_SECONDS"):
255+
BACKUP_CACHE_TIME_TO_LIVE_SECONDS = config.get(__override_section, "BACKUP_CACHE_TIME_TO_LIVE_SECONDS")
256+
251257
__docker_mounts = "docker.mounts"
252258
__docker_config = "docker.config"
253259
__docker_images = "docker.images"

0 commit comments

Comments
 (0)