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
and then I wanted different jobs to share the same limit per organization
class TesteOneJob < ApplicationJob
include Sidekiq::Throttled::Worker
sidekiq_throttle_as :shared_throttling_rule
def perform(job_number, org_id:)
Rails.logger.debug "Performing TesteOneJob #{job_number} for organization #{org_id} at #{Time.zone.now}"
sleep(1)
Rails.logger.debug "Finished TesteOneJob #{job_number} at #{Time.zone.now}"
end
end
class TesteJob < ApplicationJob
include Sidekiq::Throttled::Worker
sidekiq_throttle_as :shared_throttling_rule
def perform(job_number, org_id:)
Rails.logger.debug "Performing TesteJob #{job_number} for organization #{org_id} at #{Time.zone.now}"
sleep(1)
Rails.logger.debug "Finished TesteJob #{job_number} at #{Time.zone.now}"
end
end
The text was updated successfully, but these errors were encountered:
i wanted to have a shared rule per job but have a limit of something per key ( per organization )
and then I wanted different jobs to share the same limit per organization
The text was updated successfully, but these errors were encountered: