[webservice] Select partition based on beamtime dates
Description
Beamtimes can be active for a longer period of time, even though there is no user experiment ongoing, for reasons such as compensation time.
This leads to a problem where the jobs for such proposals are ran with high priority, although they're on ongoing.
MyMDC provides information regarding the beamtime, on top of the proposal status, with the begin and end dates.
These dates, as well as the proposal status, are now used to select the correct slurm partition.
How Has This Been Tested?
The changes were tested with the test installation with the following settings:
Proposal | Run | Action | Proposal Status | Beamtime | Expected Partition |
---|---|---|---|---|---|
900113 | 9999 | correct | FR | 2019-12-12T13:54:29.000+01:00 - 2019-12-17T13:54:29.000+01:00 | exfel |
900113 | 9999 | correct | A | 2019-12-17T13:54:29.000+01:00 - 2019-12-17T13:54:29.000+01:00 | exfel |
3014 | 267 | dark | FR | 2022-08-31T15:29:37.902435 - 2022-09-02T15:30:06.322790 (ongoing as of this MR) | upex-high |
3014 | 267 | correct | A | 2022-08-31T15:29:37.902435 - 2022-09-02T15:30:06.322790 (ongoing as of this MR) | upex-middle |
Note that the replies from MyMDC were intercepted to change the beamtime dates and proposal status.
Tests were added to check for various scenarios.
Relevant Documents (optional)
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- My code follows the code style of this project.
- My change requires a change to the documentation.
- I have updated the documentation accordingly.
- I added tests where appropriate.
Reviewers
Edited by Cyril Danilevski