Class: QPush::Server::Apis::Execute

Inherits:
Base
  • Object
show all
Defined in:
lib/qpush/server/apis/execute.rb

Instance Method Summary collapse

Methods inherited from Base

call

Constructor Details

#initialize(job) ⇒ Execute

Returns a new instance of Execute.



5
6
7
# File 'lib/qpush/server/apis/execute.rb', line 5

def initialize(job)
  @job = job
end

Instance Method Details

#callObject



9
10
11
12
13
14
# File 'lib/qpush/server/apis/execute.rb', line 9

def call
  measure_run_time { job_object.call }
  Success.call(@job)
rescue => e
  Fail.call(@job, e)
end