You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The valid? method on a batch seems to have incorrect logic.
I specifically ran into an issue invalidating batches since the valid? method always returns false due to an integer now being returned by Redis#exists(key). resque/redis-namespace#195
I ran into this with the following example, working to invalidate jobs within a batch. Here's an example job:
class Imports::Payments::ChunkJob < Imports::ChunkBase
include Sidekiq::Job
def perform(opts)
return unless valid_within_batch?
end
end
I run the batch to get things started and I expect the batch to fully run, but valid_within_batch? always returns false. I threw a debugger in the job and found the following:
The
valid?
method on a batch seems to have incorrect logic.I specifically ran into an issue invalidating batches since the
valid?
method always returns false due to an integer now being returned byRedis#exists(key)
. resque/redis-namespace#195sidekiq-batch/lib/sidekiq/batch.rb
Line 133 in e1cdc03
Seems like changing this line in the
valid?
method would work:to
I ran into this with the following example, working to invalidate jobs within a batch. Here's an example job:
I run the batch to get things started and I expect the batch to fully run, but
valid_within_batch?
always returns false. I threw a debugger in the job and found the following:The text was updated successfully, but these errors were encountered: