class SmsWorker include Sidekiq::Worker
sidekiq_options :rate => { #sidekiq rate-limiter gem :limit => 1, :period => 180, }
def perform(user_id) Sidekiq.redis do |conn| user = User.find(user_id) if user.invitation_sms user.update_attributes(:invited => true, :sms_invite_date => Date.today) end end end
end
class HatsWorker include Sidekiq::Worker
def perform(user_id) Sidekiq.redis do |conn| user = User.find(user_id) user.know_sms end end
end
--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To post to this group, send email to sid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/b8fb81c1-72b6-44bc-a2b9-1bbfe5a577a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/82664192-fb35-4247-b427-27c78f43695a%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Sidekiq" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sidekiq/HNAFMIKqjQQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sidekiq+u...@googlegroups.com.
To post to this group, send email to sid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/CAPjBv7rjZe4qTLQR46O3oNQ7scBd1Pfdfit5mUu-vNSxGxpGKA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/CALHs7%3DKauAgzcg2BP2RsUf1SwPRRxGk7PyRuVZ5LWBYbPVAxxg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/CALHs7%3DKauAgzcg2BP2RsUf1SwPRRxGk7PyRuVZ5LWBYbPVAxxg%40mail.gmail.com.