Add option to reset all jobs to 'pending' once all are finished with a new request (looping)#228
Open
BmBaczkowski wants to merge 2 commits intomasterfrom
Open
Add option to reset all jobs to 'pending' once all are finished with a new request (looping)#228BmBaczkowski wants to merge 2 commits intomasterfrom
BmBaczkowski wants to merge 2 commits intomasterfrom
Conversation
When a participant finished the last job and client requests the next job, the system checks if looping is enabled. If so, it resets all job states for that participant back to "pending" Increments the loop_count in the participations table: loop_count is stored in job_results (change study data model) Participant starts from the first job again Only new job_results include loop_count metadata Relates to #215
Relates to #215
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.
Closes #215
loop_count)Additionally, the functionality was tested by manually modifying the DB to mimic client behavior with the procedure described below. @smathot Could you check this independently with a client (instead of
curl) whether you getNoJobsForParticipantand tell me your setup?node ace migration:refreshandnode ace seed.npm run dev.Some jobs should be 'finished' and some 'pending'.
9. Request the index of the first pending job with
curlandjqcurl http://localhost:3000/api/v1/participants/a/1/currentjob_idx | jqIt should print position
51.10. Change the status of all jobs to 'finished'
curlandjqusing command from 9. It should print 'no jobs available'.1.and verify using command from 8.
18. Request the index of the first pending job with
curl(command 9) to check if there is any unexpected behavior and verify (command 8).19. Disable looping in UI.
20. Verify with command 7.
21. Request 'pending' job with
curlusing command 9. Should print2.22. Update DB to set all jobs to 'finished' using command 10.
21. Verify using
curlwith command 9. Should print 'no jobs'.