scitran / core

RESTful API
https://scitran.github.io
MIT License
18 stars 18 forks source link

Add queue peek support #1092

Closed kofalt closed 6 years ago

kofalt commented 6 years ago

Allows a consumer to peek from the queue. Not guaranteed to return a job, even if there are matching candidates.

So is it peek, or maybe-peek? We report, you decide.

Review Checklist

kofalt commented 6 years ago

Also drops support for job.now, which was an unused preemptive feature.

codecov-io commented 6 years ago

Codecov Report

Merging #1092 into master will decrease coverage by 0.09%. The diff coverage is 61.9%.

@@            Coverage Diff            @@
##           master    #1092     +/-   ##
=========================================
- Coverage   90.81%   90.71%   -0.1%     
=========================================
  Files          50       50             
  Lines        7031     7035      +4     
=========================================
- Hits         6385     6382      -3     
- Misses        646      653      +7
nagem commented 6 years ago

LGTM, I'll spend ~3 minutes seeing if there is a more obvious way to do a noop mongo update but with the comment it's fine. After a test is added to hit the peek branches, feel free to merge at your convenience.