Class: Maestrano::Connector::Rails::PushToConnecWorker
- Inherits:
-
Object
- Object
- Maestrano::Connector::Rails::PushToConnecWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- app/jobs/maestrano/connector/rails/push_to_connec_worker.rb
Overview
This class process the push to Connec, it use PushToConnecJob for retrocompatibility By using sidekiq-unique-jobs, it makes sure that 2 calls on the same entity, are processed in order
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.unique_args(args) ⇒ Object
8 9 10 11 12 13 |
# File 'app/jobs/maestrano/connector/rails/push_to_connec_worker.rb', line 8 def self.unique_args(args) organization_id = args[0] entities_hash = args[1] [organization_id, entities_hash.keys.sort] end |
Instance Method Details
#perform(organization_id, entities_hash, opts = {}) ⇒ Object
15 16 17 18 |
# File 'app/jobs/maestrano/connector/rails/push_to_connec_worker.rb', line 15 def perform(organization_id, entities_hash, opts = {}) organization = Organization.find(organization_id) PushToConnecJob.new.perform(organization, entities_hash, opts) end |