Module: RendererMethods

Extended by:
ActiveSupport::Concern
Defined in:
app/services/renderer_methods.rb

Overview

macros to fetch information about invoked jobs

Instance Method Summary collapse

Instance Method Details

#find_job_invocation_by_id(job_id, preload: nil) ⇒ Object



7
8
9
10
11
# File 'app/services/renderer_methods.rb', line 7

def find_job_invocation_by_id(job_id, preload: nil)
  JobInvocation.preload(preload).find_by(id: job_id)
rescue ActiveRecord::NotFound => _e
  raise ::Foreman::Exception.new(N_("Can't find Job Invocation for an id %s"), job_id)
end