Sha256: e897979250b3bdfdcbba9119642ab456dc3d148f01388087c41038d284eddb22
Contents?: true
Size: 583 Bytes
Versions: 4
Compression:
Stored size: 583 Bytes
Contents
module Actions class DeliverLongRunningTasksNotification < EntryAction def plan(report) return if report.task_uuids.empty? plan_self report: report end 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 def humanized_name _('Deliver notifications about long running tasks') end end end
Version data entries
4 entries across 4 versions & 1 rubygems