Class: QPush::Server::ApiWrapper
- Inherits:
-
Object
- Object
- QPush::Server::ApiWrapper
- Defined in:
- lib/qpush/server/apis.rb
Overview
The ApiWrapper provides simple wrapper functions for all the API classes available for jobs. This provides a single entry point to the API’s for job objects.
Instance Method Summary collapse
- #delay ⇒ Object
- #execute ⇒ Object
-
#initialize(job) ⇒ ApiWrapper
constructor
A new instance of ApiWrapper.
- #morgue ⇒ Object
- #perform ⇒ Object
- #queue ⇒ Object
- #retry ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(job) ⇒ ApiWrapper
Returns a new instance of ApiWrapper.
23 24 25 |
# File 'lib/qpush/server/apis.rb', line 23 def initialize(job) @job = job end |
Instance Method Details
#delay ⇒ Object
39 40 41 |
# File 'lib/qpush/server/apis.rb', line 39 def delay Apis::Delay.call(@job, :delay) end |
#execute ⇒ Object
35 36 37 |
# File 'lib/qpush/server/apis.rb', line 35 def execute Apis::Execute.call(@job) end |
#morgue ⇒ Object
47 48 49 |
# File 'lib/qpush/server/apis.rb', line 47 def morgue Apis::Morgue.call(@job) end |
#perform ⇒ Object
31 32 33 |
# File 'lib/qpush/server/apis.rb', line 31 def perform Apis::Perform.call(@job) end |
#queue ⇒ Object
27 28 29 |
# File 'lib/qpush/server/apis.rb', line 27 def queue Apis::Queue.call(@job) end |