plugin: improve job.state.priority
callback
#425
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Continuing the improvement process on the priority plugin. The callback for
job.state.priority
uses a manual lookup for associations in the case where we need to re-look up a user's accounting information, but accounting.cpp has a cleanly defined implementation of this now.This PR reformats the
job.state.priority
callback to make use of the new external lookup function defined injob.state.priority
. It improves some of the comments throughout the function and adds new ones. Finally, it adjusts the test that checks for an exception message injob.state.priority
to account for the new message format (it matches the exception message injob.validate
).Fixes #424