module Aeternitas
Constants
- VERSION
Public Class Methods
config()
click to toggle source
Access the configuration @return [Aeternitas::Configuration] the Aeternitas
configuration
# File lib/aeternitas.rb, line 28 def self.config @config ||= Configuration.new end
configure() { |config| ... }
click to toggle source
Configure Aeternitas
@see Aeternitas::Configuration
@yieldparam [Aeternitas::Configuration] config the aeternitas configuration
# File lib/aeternitas.rb, line 35 def self.configure yield(self.config) end
enqueue_due_pollables()
click to toggle source
Enqueues all active pollables for which next polling is lower than the current time
# File lib/aeternitas.rb, line 40 def self.enqueue_due_pollables Aeternitas::PollableMetaData.due.find_each do |pollable_meta_data| Aeternitas::Sidekiq::PollJob .set(queue: pollable_meta_data.pollable.pollable_configuration.queue) .perform_async(pollable_meta_data.id) pollable_meta_data.enqueue pollable_meta_data.save end end
redis()
click to toggle source
Get the configured redis connection @return [ConnectionPool::Wrapper] returns a redis connection from the pool
# File lib/aeternitas.rb, line 22 def self.redis @redis ||= ConnectionPool::Wrapper.new(size: 5, timeout: 3) { Redis.new(self.config.redis) } end