Module: Shoryuken::Later

Defined in:
lib/shoryuken/later.rb,
lib/shoryuken/later/cli.rb,
lib/shoryuken/later/client.rb,
lib/shoryuken/later/poller.rb,
lib/shoryuken/later/worker.rb,
lib/shoryuken/later/version.rb

Defined Under Namespace

Modules: Worker Classes: CLI, Client, Poller

Constant Summary collapse

MAX_QUEUE_DELAY =
15 * 60
DEFAULT_POLL_DELAY =
5 * 60
DEFAULTS =
{
  aws: {},
  later: {
    tables: [],
    delay: DEFAULT_POLL_DELAY,
  },
  timeout: 8
}
VERSION =
'0.1.3'
@@tables =
[]
@@default_table =
'shoryuken_later'

Class Method Summary collapse

Class Method Details

.default_tableObject



33
34
35
# File 'lib/shoryuken/later.rb', line 33

def default_table
  @@default_table
end

.default_table=(table) ⇒ Object



37
38
39
# File 'lib/shoryuken/later.rb', line 37

def default_table=(table)
  @@default_table = table
end

.loggerObject



45
46
47
# File 'lib/shoryuken/later.rb', line 45

def logger
  Shoryuken::Logging.logger
end

.optionsObject



25
26
27
# File 'lib/shoryuken/later.rb', line 25

def options
  @options ||= DEFAULTS.dup.tap{|h| h[:later] = h[:later].dup }
end

.poll_delayObject



29
30
31
# File 'lib/shoryuken/later.rb', line 29

def poll_delay
  options[:later][:delay] || DEFAULT_POLL_DELAY
end

.tablesObject



41
42
43
# File 'lib/shoryuken/later.rb', line 41

def tables
  @@tables
end