Class: Actions::Middleware::BindJobInvocation

Inherits:
Dynflow::Middleware
  • Object
show all
Defined in:
app/lib/actions/middleware/bind_job_invocation.rb

Instance Method Summary collapse

Instance Method Details

#delay(*args) ⇒ Object



6
7
8
9
10
11
12
13
# File 'app/lib/actions/middleware/bind_job_invocation.rb', line 6

def delay(*args)
  schedule_options, job_invocation = args
  if !job_invocation.task_id.nil? && job_invocation.task_id != task.id
    job_invocation = job_invocation.deep_clone!
    args = [schedule_options, job_invocation]
  end
  pass(*args).tap { bind(job_invocation) }
end

#plan(*args) ⇒ Object



15
16
17
18
# File 'app/lib/actions/middleware/bind_job_invocation.rb', line 15

def plan(*args)
  job_invocation = args.first
  pass(*args).tap { bind(job_invocation) }
end