Module: ConeyIsland
- Defined in:
- lib/coney_island.rb,
lib/coney_island/job.rb,
lib/coney_island/worker.rb,
lib/coney_island/version.rb,
lib/coney_island/performer.rb,
lib/coney_island/submitter.rb,
lib/coney_island/jobs_cache.rb,
lib/coney_island/job_argument_error.rb,
lib/coney_island/configuration_error.rb,
lib/coney_island/notifiers/base_notifier.rb,
lib/coney_island/notifiers/null_notifier.rb,
lib/coney_island/notifiers/bugsnag_notifier.rb,
lib/coney_island/notifiers/rollbar_notifier.rb,
lib/coney_island/notifiers/airbrake_notifier.rb,
lib/coney_island/notifiers/honeybadger_notifier.rb
Defined Under Namespace
Modules: Notifiers, Performer
Classes: ConfigurationError, Job, JobArgumentError, JobsCache, Submitter, Worker
Constant Summary
collapse
- VERSION =
"0.17.6"
Class Method Summary
collapse
Class Method Details
.amqp_connection ⇒ Object
8
9
10
|
# File 'lib/coney_island.rb', line 8
def self.amqp_connection
@connection
end
|
.amqp_parameters ⇒ Object
16
17
18
|
# File 'lib/coney_island.rb', line 16
def self.amqp_parameters
@amqp_parameters
end
|
.amqp_parameters=(params) ⇒ Object
12
13
14
|
# File 'lib/coney_island.rb', line 12
def self.amqp_parameters=(params)
@amqp_parameters = params
end
|
.cache_jobs ⇒ Object
102
103
104
|
# File 'lib/coney_island.rb', line 102
def self.cache_jobs
ConeyIsland::Submitter.cache_jobs
end
|
.cached_jobs ⇒ Object
106
107
108
|
# File 'lib/coney_island.rb', line 106
def self.cached_jobs
ConeyIsland::Submitter.cached_jobs
end
|
.caching_jobs(&blk) ⇒ Object
114
115
116
|
# File 'lib/coney_island.rb', line 114
def self.caching_jobs(&blk)
ConeyIsland::Submitter.caching_jobs(&blk)
end
|
.config=(config_hash) ⇒ Object
.default_settings ⇒ Object
135
136
137
|
# File 'lib/coney_island.rb', line 135
def self.default_settings
{ work_queue: 'default', timeout: 30, delay: 0, highlander: false }
end
|
.delay_seed ⇒ Object
70
71
72
|
# File 'lib/coney_island.rb', line 70
def self.delay_seed
@delay_seed ||= 2
end
|
.delay_seed=(seed) ⇒ Object
74
75
76
|
# File 'lib/coney_island.rb', line 74
def self.delay_seed=(seed)
@delay_seed = seed
end
|
.flush_jobs ⇒ Object
118
119
120
|
# File 'lib/coney_island.rb', line 118
def self.flush_jobs
ConeyIsland::Submitter.flush_jobs
end
|
.initialize_background ⇒ Object
.poke_the_badger(message, context = {}, attempts = 1) ⇒ Object
126
127
128
129
130
131
132
133
|
# File 'lib/coney_island.rb', line 126
def self.poke_the_badger(message, context = {}, attempts = 1)
self.notifier.notify(message, context)
rescue
if attempts <= 3
attempts += 1
retry
end
end
|
.running_inline? ⇒ Boolean
.single_amqp_connection? ⇒ Boolean
78
79
80
|
# File 'lib/coney_island.rb', line 78
def self.single_amqp_connection?
!!self.amqp_parameters
end
|
.stop_caching_jobs ⇒ Object
110
111
112
|
# File 'lib/coney_island.rb', line 110
def self.stop_caching_jobs
ConeyIsland::Submitter.stop_caching_jobs
end
|
.stop_running_inline ⇒ Object
.tcp_connection_retry_interval(retries) ⇒ Object
28
29
30
|
# File 'lib/coney_island.rb', line 28
def self.tcp_connection_retry_interval(retries)
self.tcp_connection_retry_seed ** retries
end
|
.tcp_connection_retry_limit ⇒ Object
24
25
26
|
# File 'lib/coney_island.rb', line 24
def self.tcp_connection_retry_limit
@tcp_connection_retry_limit ||= 6
end
|
.tcp_connection_retry_limit=(limit) ⇒ Object
20
21
22
|
# File 'lib/coney_island.rb', line 20
def self.tcp_connection_retry_limit=(limit)
@tcp_connection_retry_limit = limit
end
|
.tcp_connection_retry_seed ⇒ Object
36
37
38
|
# File 'lib/coney_island.rb', line 36
def self.tcp_connection_retry_seed
@tcp_connection_retry_seed ||= 2
end
|
.tcp_connection_retry_seed=(seed) ⇒ Object
32
33
34
|
# File 'lib/coney_island.rb', line 32
def self.tcp_connection_retry_seed=(seed)
@tcp_connection_retry_seed = seed
end
|