Class: Aws::Rails::SqsActiveJob::Configuration
- Inherits:
-
Object
- Object
- Aws::Rails::SqsActiveJob::Configuration
- Defined in:
- lib/aws/rails/sqs_active_job/configuration.rb
Overview
Configuration for AWS SQS ActiveJob. Use Aws::Rails::SqsActiveJob.config
to access the singleton config instance.
Instance Attribute Summary collapse
-
#excluded_deduplication_keys ⇒ Object
Returns the value of attribute excluded_deduplication_keys.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
Don’t use this method directly: Configuration is a singleton class, use
Aws::Rails::SqsActiveJob.config
to access the singleton config. -
#queue_url_for(job_queue) ⇒ Object
Return the queue_url for a given job_queue name.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Don’t use this method directly: Configuration is a singleton class, use Aws::Rails::SqsActiveJob.config
to access the singleton config.
@ option options [Boolean] :retry_standard_errors
If `true`, StandardErrors raised by ActiveJobs are left on the queue
and will be retried (pending the SQS Queue's redrive/DLQ/maximum receive settings).
This behavior overrides the standard Rails ActiveJob
[Retry/Discard for failed jobs](https://guides.rubyonrails.org/active_job_basics.html#retrying-or-discarding-failed-jobs)
behavior. When set to `true` the retries provided by this will be
on top of any retries configured on the job with `retry_on`.
When `false`, retry behavior is fully configured
through `retry_on`/`discard_on` on the ActiveJobs.
103 104 105 106 107 108 109 |
# File 'lib/aws/rails/sqs_active_job/configuration.rb', line 103 def initialize( = {}) [:config_file] ||= config_file if File.exist?(config_file) = DEFAULTS .merge(()) .merge() set_attributes() end |
Instance Attribute Details
#excluded_deduplication_keys ⇒ Object
Returns the value of attribute excluded_deduplication_keys.
40 41 42 |
# File 'lib/aws/rails/sqs_active_job/configuration.rb', line 40 def excluded_deduplication_keys @excluded_deduplication_keys end |
Instance Method Details
#queue_url_for(job_queue) ⇒ Object
Return the queue_url for a given job_queue name
124 125 126 127 128 129 |
# File 'lib/aws/rails/sqs_active_job/configuration.rb', line 124 def queue_url_for(job_queue) job_queue = job_queue.to_sym raise ArgumentError, "No queue defined for #{job_queue}" unless queues.key? job_queue queues[job_queue] end |