Skip to content

Commit

Permalink
move SqsActiveJob's class methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kakubin committed Jul 20, 2024
1 parent 9f18283 commit 68b8e88
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 15 additions & 1 deletion lib/aws/rails/sqs_active_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ module Rails
# == AWS SQS ActiveJob.
#
# SQS-based queuing backend for Active Job.
module SqsActiveJob; end
module SqsActiveJob
# @return [Configuration] the (singleton) Configuration
def self.config
@config ||= Configuration.new
end

# @yield Configuration
def self.configure
yield(config)
end

def self.fifo?(queue_url)
queue_url.ends_with? '.fifo'
end
end
end
end
14 changes: 0 additions & 14 deletions lib/aws/rails/sqs_active_job/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@ module Aws
module Rails
# Configuration for AWS SQS ActiveJob.
module SqsActiveJob
# @return [Configuration] the (singleton) Configuration
def self.config
@config ||= Configuration.new
end

# @yield Configuration
def self.configure
yield(config)
end

def self.fifo?(queue_url)
queue_url.ends_with? '.fifo'
end

# Use +Aws::Rails::SqsActiveJob.config+ to access the singleton config instance.
class Configuration
# Default configuration options
Expand Down

0 comments on commit 68b8e88

Please sign in to comment.