add runAt property to job#146
Merged
Merged
Conversation
bp-FLN
force-pushed
the
job-runAt-property
branch
from
August 5, 2018 09:09
f21a108 to
cb31baf
Compare
gresrun
requested changes
Aug 13, 2018
| import java.util.Collection; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
| import java.util.*; |
Owner
There was a problem hiding this comment.
Please only use explicit imports.
|
|
||
| class JobPayload { | ||
| String element; | ||
| Double score; |
Owner
There was a problem hiding this comment.
These properties can both be final since they're only written to in the constructor.
Contributor
Author
There was a problem hiding this comment.
i was able to get rid of this, as per your other suggestion
| * @return | ||
| */ | ||
| private Collection<String> paylods(final Jedis jedis, final String queueName, final long jobOffset, final long jobCount) { | ||
| private Collection<JobPayload> getJobPayloads(final Jedis jedis, final String queueName, final long jobOffset, final long jobCount) { |
Owner
There was a problem hiding this comment.
What if this method just returned Collection<Job>? Since you're iterating over the elements here, might as well create the Job instead of an intermediary JobPayload object. Will simplify getQueueInfo() quite a bit, too.
Contributor
Author
There was a problem hiding this comment.
yeah totally makes sense and results in less code. thanks!
Owner
|
Thanks for the quality PR! Just a few thoughts on restructuring a bit. |
bp-FLN
force-pushed
the
job-runAt-property
branch
from
August 13, 2018 10:08
cb31baf to
6b3ef87
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.
This patch adds a
runAtproperty to theJobclass.The property is set by
QueueInfoDAORedisImpl#getQueueInfo, but only when the queue is a delayed one.The property is exposed via
QueueInfo.getJobs()*.runAt.