Class: Aws::Rails::SqsActiveJob::JobRunner Private
- Inherits:
-
Object
- Object
- Aws::Rails::SqsActiveJob::JobRunner
- Defined in:
- lib/aws/rails/sqs_active_job/job_runner.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #class_name ⇒ Object readonly private
- #id ⇒ Object readonly private
Instance Method Summary collapse
- #exception_executions? ⇒ Boolean private
-
#initialize(message) ⇒ JobRunner
constructor
private
A new instance of JobRunner.
- #run ⇒ Object private
Constructor Details
#initialize(message) ⇒ JobRunner
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of JobRunner.
10 11 12 13 14 |
# File 'lib/aws/rails/sqs_active_job/job_runner.rb', line 10 def initialize() @job_data = Aws::Json.load(.data.body) @class_name = @job_data['job_class'].constantize @id = @job_data['job_id'] end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/aws/rails/sqs_active_job/job_runner.rb', line 8 def class_name @class_name end |
#id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/aws/rails/sqs_active_job/job_runner.rb', line 8 def id @id end |
Instance Method Details
#exception_executions? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 |
# File 'lib/aws/rails/sqs_active_job/job_runner.rb', line 20 def exception_executions? @job_data['exception_executions'] && !@job_data['exception_executions'].empty? end |
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/aws/rails/sqs_active_job/job_runner.rb', line 16 def run ActiveJob::Base.execute @job_data end |