Class: Dynflow::ActiveJob::QueueAdapters::JobWrapper
- Inherits:
-
Dynflow::Action
- Object
- Serializable
- Dynflow::Action
- Dynflow::ActiveJob::QueueAdapters::JobWrapper
- Defined in:
- lib/dynflow/active_job/queue_adapter.rb
Constant Summary
Constants inherited from Dynflow::Action
Dynflow::Action::DelayedEvent, Dynflow::Action::ERROR, Dynflow::Action::OutputReference, Dynflow::Action::SUSPEND, Dynflow::Action::Skip
Constants included from Dynflow::Action::Rescue
Dynflow::Action::Rescue::Strategy, Dynflow::Action::Rescue::SuggestedStrategy
Constants inherited from Serializable
Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT
Instance Attribute Summary
Attributes inherited from Dynflow::Action
#caller_action_id, #caller_execution_plan_id, #execution_plan_id, #finalize_step_id, #id, #input, #pending_output_chunks, #phase, #plan_step_id, #run_step_id, #world
Attributes included from Dynflow::Action::Progress
Instance Method Summary collapse
Methods inherited from Dynflow::Action
#action_logger, all_children, #all_planned_actions, #caller_action, children, constantize, #delayed_events, #drop_output_chunks!, #error, #execute, #execute_delay, #execution_plan, execution_plan_hooks, #finalize_step, #from_subscription?, #holds_singleton_lock?, #humanized_state, inherit_execution_plan_hooks, inherited, #initialize, middleware, #output, #output=, #output_chunk, #phase!, #phase?, #plan_event, #plan_step, #planned_actions, #required_step_ids, #run_step, #serializer, #set_plan_context, #state, #steps, #stored_output_chunks, subscribe, #to_hash, #triggering_action
Methods included from Dynflow::Action::Format
Methods included from Dynflow::Action::Rescue
#combine_suggested_strategies, #rescue_strategy_for_planned_action, #rescue_strategy_for_self
Methods included from Dynflow::Action::Progress
#finalize_progress, #finalize_progress_weight, #run_progress, #run_progress_weight
Methods inherited from Serializable
constantize, from_hash, new_from_hash, #to_hash
Constructor Details
This class inherits a constructor from Dynflow::Action
Instance Method Details
#label ⇒ Object
50 51 52 |
# File 'lib/dynflow/active_job/queue_adapter.rb', line 50 def label input[:job_class] end |
#plan(attributes) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/dynflow/active_job/queue_adapter.rb', line 39 def plan(attributes) input[:job_class] = attributes['job_class'] input[:queue] = attributes['queue_name'] input[:job_data] = attributes plan_self end |
#queue ⇒ Object
35 36 37 |
# File 'lib/dynflow/active_job/queue_adapter.rb', line 35 def queue input[:queue].to_sym end |
#rescue_strategy ⇒ Object
54 55 56 |
# File 'lib/dynflow/active_job/queue_adapter.rb', line 54 def rescue_strategy Action::Rescue::Skip end |
#run ⇒ Object
46 47 48 |
# File 'lib/dynflow/active_job/queue_adapter.rb', line 46 def run ::ActiveJob::Base.execute(input[:job_data]) end |