acisops / acis_thermal_check

Thermal model prediction and validation for Chandra ACIS Operations
https://cxc.cfa.harvard.edu/acis/acis_thermal_check
0 stars 4 forks source link

Set commands v2 scenario to `flight` by default #52

Open taldcroft opened 2 years ago

taldcroft commented 2 years ago

In the next release of ska3-flight 2022.9, commands v2 will become the default. In order to reduce network dependencies in load review, you can set the commands v2 scenario to flight by default. This can be done with the following code, perhaps in acis_thermal_check/main.py:

os.environ.setdefault('KADI_SCENARIO', 'flight')

Since any machine on the HEAD network will see /proj/sot/ska/data/kadi which is kept up to date every 10 minutes, this should always be good for production load review. If you ever run the LR tools on a laptop, you might instead want this code, which is what we did for ACA review starcheck:

from testr import test_helper

# For kadi commands v2 running on HEAD set the default scenario to flight.
# This is aimed at running in production where the commands archive is
# updated hourly. In this case no network resources are used.
if test_helper.on_head_network():
    os.environ.setdefault('KADI_SCENARIO', 'flight')