Class: Actions::DeliverLongRunningTasksNotification
- Inherits:
 - 
      EntryAction
      
        
- Object
 - Dynflow::Action
 - Base
 - EntryAction
 - Actions::DeliverLongRunningTasksNotification
 
 
- Defined in:
 - app/lib/actions/deliver_long_running_tasks_notification.rb
 
Instance Method Summary collapse
Methods inherited from EntryAction
#action_subject, all_action_names, #delay, #drop_all_locks!, #humanized_input, #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_output, #notify_paused, #serializer_class, #task, #task_input, #task_output
Methods included from TaskSynchronization
included, #sync_execution_plan_to_task
Methods included from Helpers::LifecycleLogging
included, #log_task_state_change
Instance Method Details
#humanized_name ⇒ Object
      18 19 20  | 
    
      # File 'app/lib/actions/deliver_long_running_tasks_notification.rb', line 18 def humanized_name _('Deliver notifications about long running tasks') end  | 
  
#plan(report) ⇒ Object
      3 4 5 6 7  | 
    
      # File 'app/lib/actions/deliver_long_running_tasks_notification.rb', line 3 def plan(report) return if report.task_uuids.empty? plan_self report: report end  | 
  
#rescue_strategy_for_self ⇒ Object
      22 23 24  | 
    
      # File 'app/lib/actions/deliver_long_running_tasks_notification.rb', line 22 def rescue_strategy_for_self ::Dynflow::Action::Rescue::Skip end  | 
  
#run ⇒ Object
      9 10 11 12 13 14 15 16  | 
    
      # File 'app/lib/actions/deliver_long_running_tasks_notification.rb', line 9 def run report = OpenStruct.new(input[:report]) tasks = ForemanTasks::Task.where(id: report.task_uuids) report.user = User.current report.tasks = tasks ::UINotifications::Tasks::TasksRunningLong.new(report).deliver! TasksMailer.long_tasks(report).deliver_now end  |