Skip to content

Commit

Permalink
Allow config override for backup constants
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares committed Dec 11, 2024
1 parent 991f309 commit 4d31c39
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rqd/rqd/rqconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

# pylint: disable=wrong-import-position
from future import standard_library
from six import _K
standard_library.install_aliases()
# pylint: enable=wrong-import-position

Expand Down Expand Up @@ -164,7 +165,7 @@

# Backup running frames cache. Backup cache is turned off if this path is set to
# None or ""
BACKUP_CACHE_PATH = "/tmp/opencue/running_frames_backup.dat"
BACKUP_CACHE_PATH = ""
BACKUP_CACHE_TIME_TO_LIVE_SECONDS = 60

try:
Expand Down Expand Up @@ -248,6 +249,11 @@
if config.has_section(__host_env_var_section):
RQD_HOST_ENV_VARS = config.options(__host_env_var_section)

if config.has_option(__override_section, "BACKUP_CACHE_PATH"):
BACKUP_CACHE_PATH = config.get(__override_section, "BACKUP_CACHE_PATH")
if config.has_option(__override_section, "BACKUP_CACHE_TIME_TO_LIVE_SECONDS"):
BACKUP_CACHE_TIME_TO_LIVE_SECONDS = config.get(__override_section, "BACKUP_CACHE_TIME_TO_LIVE_SECONDS")

__docker_mounts = "docker.mounts"
__docker_config = "docker.config"
__docker_images = "docker.images"
Expand Down

0 comments on commit 4d31c39

Please sign in to comment.