Class: Actions::Middleware::KeepCurrentRequestID

Inherits:
Dynflow::Middleware
  • Object
show all
Defined in:
lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb

Instance Method Summary collapse

Instance Method Details

#delay(*args) ⇒ Object



4
5
6
# File 'lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb', line 4

def delay(*args)
  pass(*args).tap { store_current_request_id }
end

#finalizeObject



18
19
20
# File 'lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb', line 18

def finalize
  restore_current_request_id { pass }
end

#hook(*args) ⇒ Object

Run all execution plan lifecycle hooks as the original request_id



23
24
25
# File 'lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb', line 23

def hook(*args)
  restore_current_request_id { pass(*args) }
end

#plan(*args) ⇒ Object



8
9
10
11
12
# File 'lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb', line 8

def plan(*args)
  with_current_request_id do
    pass(*args).tap { store_current_request_id }
  end
end

#run(*args) ⇒ Object



14
15
16
# File 'lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb', line 14

def run(*args)
  restore_current_request_id { pass(*args) }
end