Module: Actions::RemoteExecution::Helpers::LiveOutput
- Included in:
- RunHostJob, RunProxyCommand
- Defined in:
- app/lib/actions/remote_execution/helpers/live_output.rb
Instance Method Summary collapse
- #exception_to_output(context, exception, timestamp = Time.now.getlocal) ⇒ Object
- #format_output(message, type = 'debug', timestamp = Time.now.getlocal) ⇒ Object
Instance Method Details
#exception_to_output(context, exception, timestamp = Time.now.getlocal) ⇒ Object
5 6 7 |
# File 'app/lib/actions/remote_execution/helpers/live_output.rb', line 5 def exception_to_output(context, exception, = Time.now.getlocal) format_output(context + ": #{exception.class} - #{exception.}", 'debug', ) end |
#format_output(message, type = 'debug', timestamp = Time.now.getlocal) ⇒ Object
9 10 11 12 13 |
# File 'app/lib/actions/remote_execution/helpers/live_output.rb', line 9 def format_output(, type = 'debug', = Time.now.getlocal) { 'output_type' => type, 'output' => , 'timestamp' => .to_f } end |