Skip to content

Commit

Permalink
exptable/proctable updates after PR #2321
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Bailey authored and Stephen Bailey committed Aug 16, 2024
1 parent 6bae2ae commit 81aba32
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions py/desispec/scripts/submit_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
## Import some helper functions, you can see their definitions by uncomenting the bash shell command
from desispec.workflow.utils import verify_variable_with_environment, listpath, \
remove_slurm_environment_variables
# TODO when merged into branch with crossnight dependencies this is in workflow.exptable as the new name
# from desispec.workflow.exptable import read_minimal_science_exptab_cols
from desispec.workflow.redshifts import read_minimal_exptables_columns as read_minimal_science_exptab_cols
from desispec.workflow.exptable import read_minimal_science_exptab_cols
from desispec.scripts.submit_night import submit_night
from desispec.workflow.queue import check_queue_count

import desispec.workflow.proctable

def get_nights_in_date_range(first_night, last_night):
"""
Expand Down Expand Up @@ -261,8 +259,11 @@ def submit_production(production_yaml, queue_threshold=4500, dry_run_level=False
## We don't expect exposure tables to change during code execution here
## but we do expect processing tables to evolve, so clear that cache
log.info(f"Processing {night=}")
# TODO uncomment when merged into branch with crossnight dependencies
#desispec.workflow.proctable.reset_tilenight_ptab_cache()

## Belt-and-suspenders: reset the processing table cache to force a re-read.
## This shouldn't be necessary, but resetting the cache is conservative.
desispec.workflow.proctable.reset_tilenight_ptab_cache()

if dry_run_level < 4:
logfile = os.path.join(logpath, f'night-{night}.log')
with stdouterr_redirected(logfile):
Expand Down

0 comments on commit 81aba32

Please sign in to comment.