Class: QPush::Base::Job
- Inherits:
-
Object
- Object
- QPush::Base::Job
- Defined in:
- lib/qpush/base/job.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#cron ⇒ Object
Returns the value of attribute cron.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#id ⇒ Object
Returns the value of attribute id.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#retry_max ⇒ Object
Returns the value of attribute retry_max.
-
#run_time ⇒ Object
Returns the value of attribute run_time.
-
#start_at ⇒ Object
Returns the value of attribute start_at.
-
#total_fail ⇒ Object
Returns the value of attribute total_fail.
-
#total_success ⇒ Object
Returns the value of attribute total_success.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Job
constructor
A new instance of Job.
- #to_json ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Job
Returns a new instance of Job.
17 18 19 20 |
# File 'lib/qpush/base/job.rb', line 17 def initialize( = {}) = defaults.merge() .each { |key, value| send("#{key}=", value) } end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
15 16 17 |
# File 'lib/qpush/base/job.rb', line 15 def args @args end |
#created_at ⇒ Object
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def created_at @created_at end |
#cron ⇒ Object
Returns the value of attribute cron.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def cron @cron end |
#failed ⇒ Object
Returns the value of attribute failed.
15 16 17 |
# File 'lib/qpush/base/job.rb', line 15 def failed @failed end |
#id ⇒ Object
Returns the value of attribute id.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def id @id end |
#klass ⇒ Object
Returns the value of attribute klass.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def klass @klass end |
#namespace ⇒ Object
Returns the value of attribute namespace.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def namespace @namespace end |
#priority ⇒ Object
Returns the value of attribute priority.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def priority @priority end |
#retry_max ⇒ Object
Returns the value of attribute retry_max.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def retry_max @retry_max end |
#run_time ⇒ Object
Returns the value of attribute run_time.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def run_time @run_time end |
#start_at ⇒ Object
Returns the value of attribute start_at.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def start_at @start_at end |
#total_fail ⇒ Object
Returns the value of attribute total_fail.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def total_fail @total_fail end |
#total_success ⇒ Object
Returns the value of attribute total_success.
12 13 14 |
# File 'lib/qpush/base/job.rb', line 12 def total_success @total_success end |
Instance Method Details
#to_json ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/qpush/base/job.rb', line 35 def to_json { klass: @klass, id: @id, priority: @priority, created_at: @created_at, start_at: @start_at, cron: @cron, retry_max: @retry_max, total_fail: @total_fail, total_success: @total_success, failed: @failed, args: @args }.to_json end |