Skip to content

Commit

Permalink
use readonly mount for dashboard counting
Browse files Browse the repository at this point in the history
  • Loading branch information
akremin committed Oct 31, 2024
1 parent f67463c commit 7a00033
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions py/desispec/scripts/procdashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
get_terminal_steps, get_tables, populate_monthly_tables, get_nights
from desispec.workflow.proctable import table_row_to_dict
from desispec.workflow.queue import update_from_queue, get_non_final_states
from desispec.io.meta import specprod_root
from desispec.io.meta import specprod_root, get_readonly_filepath
from desispec.io.util import decode_camword, camword_to_spectros, \
difference_camwords, erow_to_goodcamword
from desiutil.log import get_logger
Expand Down Expand Up @@ -295,11 +295,12 @@ def populate_exp_night_info(night, night_json_info=None, check_on_disk=False, sk
del proctab
exptab.sort(['ORDER'])

readonly_specproddir = get_readonly_filepath(specproddir)
logpath = os.path.join(specproddir, 'run', 'scripts', 'night', str(night))
logfiletemplate = os.path.join(logpath, '{pre}-{night}-{zexpid}-{specs}{jobid}.{ext}')
fileglob_template = os.path.join(specproddir, 'exposures', str(night),
fileglob_template = os.path.join(readonly_specproddir, 'exposures', str(night),
'{zexpid}', '{ftype}-{cam}[0-9]-{zexpid}.{ext}')
fileglob_calib_template = os.path.join(specproddir, 'calibnight', str(night),
fileglob_calib_template = os.path.join(readonly_specproddir, 'calibnight', str(night),
'{ftype}-{cam}[0-9]-{night}.{ext}')

def count_num_files(ftype, expid=None):
Expand Down
2 changes: 1 addition & 1 deletion py/desispec/scripts/zprocdashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def populate_z_night_info(night, night_json_info=None, doem=True, doqso=True,
def count_num_files(ztype, ftype, tileid, expid, night):
filename = findfile(filetype='spectra', night=int(night), expid=int(expid),
camera='b1', tile=int(tileid), groupname=ztype,
spectrograph=1)
spectrograph=1, readonly=True)

if ftype == 'tile-qa':
fileroot = filename.replace(f'spectra-1-', f'{ftype}-').split('.')[0]
Expand Down

0 comments on commit 7a00033

Please sign in to comment.