File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
src/nectarchain/user_scripts/jlenain/dqm_job_submitter Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,19 @@ for run in $(find ${localParentDir} -type f -name "NectarCAM*.fits.fz" | awk -F.
2424 # If number of local and remote files matching, will attempt to launch a DQM run
2525 if [ $nbLocalFiles -eq $nbRemoteFiles ]; then
2626 echo " Run $run : number of local and remote files matching, will attempt to submit a DQM job"
27- yyyymmdd=$( find ${localParentDir} -type f -name " NectarCAM.Run${run} .????.fits.fz" | head -n 1 | awk -F/ ' {print $6}' )
28- yyyy=${yyyymmdd: 0: 4}
29- mm=${yyyymmdd: 4: 2}
30- dd=${yyyymmdd: 6: 2}
31- cmd=" python submit_dqm_processor.py -d " ${yyyy} -${mm} -${dd} " -r $run "
32- echo " Running: $cmd "
33- eval $cmd
27+ # Has this DQM run already been submitted ?
28+ if [ $( dstat | grep -e " NectarCAM DQM run ${run} " | wc -l) -eq 0 ]; then
29+ yyyymmdd=$( find ${localParentDir} -type f -name " NectarCAM.Run${run} .????.fits.fz" | head -n 1 | awk -F/ ' {print $6}' )
30+ yyyy=${yyyymmdd: 0: 4}
31+ mm=${yyyymmdd: 4: 2}
32+ dd=${yyyymmdd: 6: 2}
33+ cmd=" python submit_dqm_processor.py -d " ${yyyy} -${mm} -${dd} " -r $run "
34+ echo " Running: $cmd "
35+ eval $cmd
36+ else
37+ echo " DQM job for run $run already submitted, either ongoing or failed, skipping it."
38+ fi
3439 else
35- echo " Run $run is not yet complete on DIRAC, will wait another day before launching a DQM job on it."
40+ echo " Run $run is not yet complete on DIRAC, will wait another day before launching a DQM job on it."
3641 fi
3742done
You can’t perform that action at this time.
0 commit comments