Class: Aws::ActiveJob::SQS::JobRunner Private
- Inherits:
-
Object
- Object
- Aws::ActiveJob::SQS::JobRunner
- Defined in:
- lib/aws/active_job/sqs/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.
Constant Summary collapse
- JOB_CLASS_NAME_PATTERN =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
A job class name is an (optionally namespaced) constant path and nothing else. Names that cannot match this can never name a job class, so rejecting them keeps them out of the constant lookup.
/\A[A-Z]\w*(::[A-Z]\w*)*\z/.freeze
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.
23 24 25 26 27 |
# File 'lib/aws/active_job/sqs/job_runner.rb', line 23 def initialize() @job_data = ActiveSupport::JSON.load(.data.body) @class_name = resolve_job_class(@job_data['job_class']) @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.
21 22 23 |
# File 'lib/aws/active_job/sqs/job_runner.rb', line 21 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.
21 22 23 |
# File 'lib/aws/active_job/sqs/job_runner.rb', line 21 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.
33 34 35 36 |
# File 'lib/aws/active_job/sqs/job_runner.rb', line 33 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.
29 30 31 |
# File 'lib/aws/active_job/sqs/job_runner.rb', line 29 def run ::ActiveJob::Base.execute @job_data end |