Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sidekiq Push Bulk In
module Sidekiq
class Client
def self.push_bulk_in(interval, items)
int = interval.to_f
now = Time.now.to_f
ts = (int < 1_000_000_000 ? now + int : int)
items['at'.freeze] = ts if ts >= now
push_bulk(items)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.