Please sign in to comment.
Base `JobBatch#complete?` on the presence of `completed_at`.
The old logic was designed to figure out when to mark the job batch as complete by setting the timestamp -- but that has been moved into the lua script. Basing `complete?` on the job jid sets is potentially risky since we have discussed making some of the job batch redis keys expire sooner than others. If the job jid set keys vanished from redis the old logic would wrongly report the job batch was not complete even though it was. The new logic relies only on the `meta` key which is the primary key used by a job batch to track its state.
- Loading branch information...
Showing with 6 additions and 17 deletions.