Show clearer messages when running webservice in sim mode
Description
This closes issue https://git.xfel.eu/gitlab/calibration/planning/issues/53, which came about during a deployment testing session where I forgot to specify the --mode prod
flag and we were confused for a while.
It's kind of a bug fix, because the messages weren't clear that it's in simulated mode, and they were not logged in the usual INFO
log-level.
I also cleaned the function by reducing the quantity of returns.
How Has This Been Tested?
This was tested on max-exfl017 and submitting jobs from MyMDC.
The output in web.log
was as follows:
Submitting a dark request from MyMDC yields:
2021-05-28 17:53:43,973 - root - INFO - Transfer complete: proposal 900113, runs ['9983']
2021-05-28 17:53:43,974 - root - INFO - SUCCESS: Simulated, not submitting jobs. Would do dark characterization: proposal 900113, run 9983
2021-05-28 17:53:43,974 - root - INFO - python -m xfel_calibrate.calibrate dssc DARK --concurrency-par karabo_da --slurm-scheduling 10 --request-time 2021-05-28T17:53:43 --slurm-name dark_CALLAB_dssc_202031_p900113_rr9983 --report-to /gpfs/exfel/d/cal_tst/caldb_store/xfel/reports/CALLAB/SCS_DET_DSSC1M-1/dark/dark_900113_r9983_210528_175343 --db-output --cal-db-interface tcp://max-exfl016:8015#8044 --karabo-da DSSC00 DSSC01 DSSC02 DSSC03 DSSC04 DSSC05 DSSC06 DSSC07 DSSC08 DSSC09 DSSC10 DSSC11 DSSC12 DSSC13 DSSC14 DSSC15 --in-folder /gpfs/exfel/exp/CALLAB/202031/p900113/raw --out-folder /gpfs/exfel/u/usr/CALLAB/202031/p900113/dark/runs_9983/SCS_DET_DSSC1M_1 --karabo-id SCS_DET_DSSC1M-1 --operation-mode STANDARD_OPERATION --run 9983
Submitting a correction request from MyMDC yields:
2021-05-28 17:54:59,195 - root - INFO - SUCCESS: Simulated, not submitting jobs. Would do correction: proposal 900113, run 9998
2021-05-28 17:54:59,195 - root - INFO - python -m xfel_calibrate.calibrate jungfrau CORRECT --slurm-scheduling 80 --slurm-mem 750 --request-time 2021-05-28T17:54:58 --slurm-name correct_CALLAB_jungfrau_202031_p900113_r9998 --report-to /gpfs/exfel/exp/CALLAB/202031/p900113/usr/Reports_test/r9998/FXE_XAD_JF1M_correct_900113_r9998_210528_175459 --cal-db-timeout 300000 --cal-db-interface tcp://max-exfl016:8015#8044 --db-module Jungfrau_M233 Jungfrau_M125 --karabo-da JNGFR01 JNGFR02 --karabo-da-control JNGFR01 --receiver-control-id CONTROL --receiver-id RECEIVER-{} --in-folder /gpfs/exfel/exp/CALLAB/202031/p900113/raw --out-folder /gpfs/exfel/d/proc/CALLAB/202031/p900113/r9998 --karabo-id FXE_XAD_JF1M --run 9998 --priority 2
A test was also added.
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
Reviewers
Edited by Cyril Danilevski