Class: Tantot::Strategy::Chewy::Worker
- Inherits:
-
Object
- Object
- Tantot::Strategy::Chewy::Worker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/tantot/strategy/chewy.rb
Instance Method Summary collapse
Instance Method Details
#perform(agent_id, chew_strategy, changes_by_model) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/tantot/strategy/chewy.rb', line 7 def perform(agent_id, chew_strategy, changes_by_model) agent = Tantot.agent_registry.agent(agent_id) raise AgentNotFound.new("No registered agent with id #{id}") unless agent ::Chewy.strategy(chewy_strategy) do agent.perform(Tantot::Strategy::Sidekiq.unmarshal(changes_by_model)) end end |