Class: Actions::ActionWithSubPlans
- Inherits:
-
EntryAction
- Object
- Dynflow::Action
- Base
- EntryAction
- Actions::ActionWithSubPlans
- Includes:
- Dynflow::Action::WithSubPlans
- Defined in:
- app/lib/actions/action_with_sub_plans.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from EntryAction
#action_subject, all_action_names, #delay, #humanized_input, #humanized_name, #resource_locks, serializer_class
Methods included from Helpers::Lock
#exclusive_lock!, #link!, #lock!
Methods included from Helpers::ArgsSerialization
Methods inherited from Base
#already_running?, #humanized_errors, #humanized_input, #humanized_name, #serializer_class, #task, #task_input, #task_output
Instance Method Details
#humanized_output ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/lib/actions/action_with_sub_plans.rb', line 13 def humanized_output return unless counts_set? _("%{total} task(s), %{success} success, %{failed} fail") % { total: output[:total_count], success: output[:success_count], failed: output[:failed_count] } end |
#plan(*args) ⇒ Object
9 10 11 |
# File 'app/lib/actions/action_with_sub_plans.rb', line 9 def plan(*args) raise NotImplementedError end |
#run_progress ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/lib/actions/action_with_sub_plans.rb', line 21 def run_progress if counts_set? && output[:total_count] > 0 (output[:success_count] + output[:failed_count]).to_f / output[:total_count] else 0.1 end end |