Open
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1069 +/- ##
==========================================
+ Coverage 90.8% 90.85% +0.04%
==========================================
Files 50 50
Lines 7029 7063 +34
==========================================
+ Hits 6383 6417 +34
Misses 646 646 |
c3ed532 to
10b1fa0
Compare
kofalt
reviewed
Feb 16, 2018
api/jobs/batch.py
Outdated
| preconstructed_jobs = proposal.get('preconstructed_jobs') | ||
|
|
||
| # If Running a batch from already-constructed jobs | ||
| if preconstructed_jobs: |
Contributor
There was a problem hiding this comment.
Break these two branches out into different functions, and call them from here.
kofalt
reviewed
Feb 16, 2018
api/jobs/queue.py
Outdated
|
|
||
| @staticmethod | ||
| def enqueue_job(job_map, origin, perm_check_uid=None): | ||
| def validate_job(job_map, origin, create_job=False, perm_check_uid=None): |
Contributor
There was a problem hiding this comment.
Please do not change this function signature. Instead, revert changes to this function, then remove job.insert() to make it consistent with the original documentation. Then check usage of enqueue_job to see who will need job.insert() added after calling.
Contributor
|
Notably, this PR is a lot easier to read when using |
054dd24 to
58fc655
Compare
58fc655 to
1bb0e5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #940
Changes
POST /batch/jobswith a list of jobs,jobs: [{...}, {...}, ...], in the payloadbatch.proposal.preconstructed_jobsin mongoReview Checklist