Module: Pheme
- Defined in:
- lib/pheme/message_type/aws_event.rb,
lib/pheme/logger.rb,
lib/pheme/version.rb,
lib/pheme/compression.rb,
lib/pheme/queue_poller.rb,
lib/pheme/configuration.rb,
lib/pheme/error_reporting.rb,
lib/pheme/message_handler.rb,
lib/pheme/topic_publisher.rb,
lib/pheme/message_type/sns_message.rb
Overview
Default poller for messages publish through SNS. No need to use this concern unless the default behaviour has been overwritten and you wish to restore it.
Defined Under Namespace
Modules: Compression, MessageType
Classes: Configuration, MessageHandler, QueuePoller, TopicPublisher
Constant Summary
collapse
- VERSION =
'6.0.0'.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
6
7
8
|
# File 'lib/pheme/configuration.rb', line 6
def self.configuration
@configuration ||= Configuration.new
end
|
Class Method Details
.capture_exception(exception, message, data = {}) ⇒ Object
2
3
4
5
6
|
# File 'lib/pheme/error_reporting.rb', line 2
def self.capture_exception(exception, message, data = {})
return if configuration.error_reporting_func.nil?
configuration.error_reporting_func.call(exception, message, data)
end
|
10
11
12
|
# File 'lib/pheme/configuration.rb', line 10
def self.configure
yield(configuration)
end
|
.log(method, text) ⇒ Object
2
3
4
5
6
|
# File 'lib/pheme/logger.rb', line 2
def self.log(method, text)
@logger ||= ActiveSupport::TaggedLogging.new(configuration.logger)
@tag ||= "pheme_#{SecureRandom.uuid}"
@logger.tagged(@tag) { @logger.send(method, text) }
end
|
.logger ⇒ Object
8
9
10
|
# File 'lib/pheme/logger.rb', line 8
def self.logger
configuration.logger
end
|
.reset_configuration! ⇒ Object
14
15
16
|
# File 'lib/pheme/configuration.rb', line 14
def self.reset_configuration!
@configuration = Configuration.new
end
|