From 8072a3ece6dd2bc60855a0a1edfb9e1de444dd5b Mon Sep 17 00:00:00 2001 From: James Chiang Date: Thu, 19 Sep 2019 22:45:08 -0700 Subject: [PATCH] refactor installed raft handling to ensure that cache file is written --- python/bot_eo_analyses.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/bot_eo_analyses.py b/python/bot_eo_analyses.py index 3f09653..a0072b1 100644 --- a/python/bot_eo_analyses.py +++ b/python/bot_eo_analyses.py @@ -718,12 +718,15 @@ def run_jh_tasks(*jh_tasks, device_names=None, processes=None, walltime=3600): if device_names is None: device_names = camera_info.get_det_names() - # Restrict to installed rafts or sensors. + # Restrict to installed rafts or sensors. This function call + # also writes the camera_info cache file for the eT db query. + installed_rafts = camera_info.get_installed_raft_names() + + # Check if rafts are over-ridden in the lcatr.cfg file. override_rafts = os.environ.get('LCATR_RAFTS', None) if override_rafts is not None: installed_rafts = override_rafts.split('_') - else: - installed_rafts = camera_info.get_installed_raft_names() + device_names = [_ for _ in device_names if _[:3] in installed_rafts] cwd = os.path.abspath('.')