diff --git a/webservice/README.md b/webservice/README.md index fef79ac81a6c2c76b30755fff4dd1d6a2bdfb485..a2921c4bcb2c2b70c30d889ac30f20f7c0638f1a 100644 --- a/webservice/README.md +++ b/webservice/README.md @@ -155,3 +155,37 @@ Use ``` to display a list of available options. + +Testing +------- + +There is a test environment on ``max-exfl017``, separate from the production +instance. + +```bash +ssh xcaltst@max-exfl017.desy.de +cd /home/xcaltst/pycalibration + +# Get the code you want to test +git pull +git checkout <branch-to-test> + +# Stop the already running server, start a new one with your code +ps aux | grep webservice/webservice.py | awk '{ print $2}' | xargs kill +source ~/pycalibration_venv/bin/activate +nohup ~/pycalibration_venv/bin/python ~/pycalibration/webservice/webservice.py \ + --mode prod --logging INFO --config-file ~/pycalibration/webservice/webservice.yaml & + +# Follow the logs +tail -f ~/pycalibration/web.log +``` + +The [test instance of myMdC](https://in.xfel.eu/test_metadata/) talks to this +test service. Using data in the [CALLAB proposal](https://in.xfel.eu/test_metadata/proposals/259) +there, request recalibration ([runs tab](https://in.xfel.eu/test_metadata/proposals/259#proposal-runs)) +and processing of dark runs ([calibration constants tab](https://in.xfel.eu/test_metadata/proposals/259#proposal-calibration)) +to send the 'correct' and 'dark_request' actions. The webservice logs and the +status in myMdC should update as the processing occurs. + +The command ``squeue -u xcaltst`` will show running & pending Slurm jobs started +by this test system.