Add functionality to skip correct based on run type
Description
- Added key
correct/skip-run-types
to webservice config, which is a list of strings - Added function
check_run_type_skip
which queries mymdc with a run ID to get the run type, and checks if the type is in the list, if it is it returnsTrue
, elseFalse
- Added
Errors.RUN_SKIPPED
tomessages.py
, to be returned if a run is skipped - Added call to above function to
handle_correct
, which will logRUN_SKIPPED
, send the message to mymdc, and then exit the correct function early, if a run type is marked as to be skipped
@schmidtp asked for a regex,
How Has This Been Tested?
Added unit tests.
Relevant Documents (optional)
Maybe?
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
-
My code follows the code style of this project. -
I added tests where appropriate.
Reviewers
@schmidtp do you know if you'll have the run type(s) to be skipped soon? If not then I can just mock something in for the tests, instead of testing with the actual value in the config
Edited by Robert Rosca