coney_island 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dd8c71ca880e47d6fb40dcba0ca03fa8d18506e6
4
- data.tar.gz: 21ae5bdda28dc053c65c956bede12216f51bcd8d
2
+ SHA256:
3
+ metadata.gz: b5d8fd9675a689eea11ac0b6b989ab8ce32c2cd95477e1b4953b04dabf88c617
4
+ data.tar.gz: a30c831e913c878fb6a2c8c3e7bb02bfe18fbc17792a53975004e67d8459150b
5
5
  SHA512:
6
- metadata.gz: 3c0474492245e067e6401b305024d1013df6eda0a045f721de44ea3643a86751968997e0ab19c2960beb99dd3be0a058b7b2db84c3957844b0e17ddae0f30e60
7
- data.tar.gz: f8d99178ea5d6a48263deac86927f69b7fae8387553a6a23019663908542e11ff521b5fd53602512f93cce8f865ec921719504476be271872d8bd9f98833513b
6
+ metadata.gz: ce4ee2a778109c23e039fa12dbd4058835534a7d70ebf2cfc639b9015c8fe0c49a3b79c3c23934ea4cc27d6b46a13dfd14e0dd3e663978cb6c68ea93b746f0c3
7
+ data.tar.gz: 3c76edcb2d3c6d7bf90dcfb2c78226d439936135ab9ff4269e2bb47710c3a2e183a9a114d127e4b57089f466e96525509531fd58cc2648e81a3dfcfed8184129
data/Rakefile CHANGED
@@ -1,33 +1,7 @@
1
- begin
2
- require 'bundler/setup'
3
- rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
- end
6
-
7
- require 'rdoc/task'
8
-
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'ConeyIsland'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
16
-
17
-
1
+ require "rake/testtask"
18
2
 
19
-
20
- Bundler::GemHelper.install_tasks
21
-
22
- require 'rake/testtask'
23
-
24
- Rake::TestTask.new(:test) do |t|
25
- t.libs << 'lib'
26
- t.libs << 'test'
27
- t.pattern = 'test/**/*_test.rb'
3
+ Rake::TestTask.new do |t|
4
+ t.libs << "test"
5
+ t.test_files = FileList['test/*test.rb']
28
6
  t.verbose = true
29
- t.warning = false
30
7
  end
31
-
32
-
33
- task default: :test
data/lib/coney_island.rb CHANGED
@@ -1,3 +1,6 @@
1
+ require 'amqp'
2
+ require 'request_store'
3
+
1
4
  module ConeyIsland
2
5
 
3
6
  ### BEGIN configuration
@@ -9,25 +9,21 @@ module ActiveJob
9
9
  # To use ConeyIsland set the queue_adapter config to +:coney_island+.
10
10
  #
11
11
  # Rails.application.config.active_job.queue_adapter = :coney_island
12
- class << self
13
- def enqueue(job) #:nodoc:
14
- ConeyIsland::Submitter.submit JobWrapper, :perform, args: [job.serialize], work_queue: job.queue_name, timeout: get_timeout_from_args(job), retry_limit: get_retry_from_args(job)
15
- end
16
-
17
- def enqueue_at(job, timestamp) #:nodoc:
18
- delay = timestamp - Time.current.to_f
19
- ConeyIsland::Submitter.submit JobWrapper, :perform, args: [job.serialize], work_queue: job.queue_name, delay: delay, timeout: get_timeout_from_args(job), retry_limit: get_retry_from_args(job)
20
- end
21
-
22
- def get_timeout_from_args(job)
23
- job.class::TIMEOUT if job.class.const_defined? :TIMEOUT
24
- end
12
+ def enqueue(job) #:nodoc:
13
+ ConeyIsland::Submitter.submit JobWrapper, :perform, args: [job.serialize], work_queue: job.queue_name, timeout: get_timeout_from_args(job), retry_limit: get_retry_from_args(job)
14
+ end
25
15
 
26
- def get_retry_from_args(job)
27
- job.class::RETRY_LIMIT if job.class.const_defined? :RETRY_LIMIT
28
- end
16
+ def enqueue_at(job, timestamp) #:nodoc:
17
+ delay = timestamp - Time.current.to_f
18
+ ConeyIsland::Submitter.submit JobWrapper, :perform, args: [job.serialize], work_queue: job.queue_name, delay: delay, timeout: get_timeout_from_args(job), retry_limit: get_retry_from_args(job)
19
+ end
29
20
 
21
+ def get_timeout_from_args(job)
22
+ job.class::TIMEOUT if job.class.const_defined? :TIMEOUT
23
+ end
30
24
 
25
+ def get_retry_from_args(job)
26
+ job.class::RETRY_LIMIT if job.class.const_defined? :RETRY_LIMIT
31
27
  end
32
28
 
33
29
  class JobWrapper #:nodoc:
@@ -39,4 +35,4 @@ module ActiveJob
39
35
  end
40
36
  end
41
37
  end
42
- end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module ConeyIsland
2
- VERSION = "0.16.0"
2
+ VERSION = "0.17.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coney_island
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-06 00:00:00.000000000 Z
13
+ date: 2018-10-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 4.0.1
21
+ version: '5.1'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '6'
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 4.0.1
31
+ version: '5.1'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '6'
@@ -200,7 +200,6 @@ files:
200
200
  - test/dummy/config/routes.rb
201
201
  - test/dummy/config/secrets.yml
202
202
  - test/dummy/db/test.sqlite3
203
- - test/dummy/log/test.log
204
203
  - test/dummy/public/404.html
205
204
  - test/dummy/public/422.html
206
205
  - test/dummy/public/500.html
@@ -231,52 +230,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
230
  version: '0'
232
231
  requirements: []
233
232
  rubyforge_project:
234
- rubygems_version: 2.5.1
233
+ rubygems_version: 2.7.7
235
234
  signing_key:
236
235
  specification_version: 4
237
236
  summary: Want guaranteed delivery between your queue and your workers using ACKs?
238
237
  How about load-balancing? Throw in all the features other background worker systems
239
238
  offer and you must have a ticket to ride at Coney Island.
240
239
  test_files:
241
- - test/coney_island_test.rb
240
+ - test/dummy/app/controllers/application_controller.rb
241
+ - test/dummy/app/views/layouts/application.html.erb
242
242
  - test/dummy/app/assets/javascripts/application.js
243
243
  - test/dummy/app/assets/stylesheets/application.css
244
- - test/dummy/app/controllers/application_controller.rb
245
244
  - test/dummy/app/helpers/application_helper.rb
246
- - test/dummy/app/views/layouts/application.html.erb
245
+ - test/dummy/bin/rake
247
246
  - test/dummy/bin/bundle
248
247
  - test/dummy/bin/rails
249
- - test/dummy/bin/rake
250
- - test/dummy/config/application.rb
251
- - test/dummy/config/boot.rb
252
- - test/dummy/config/database.yml
253
- - test/dummy/config/environment.rb
254
- - test/dummy/config/environments/development.rb
248
+ - test/dummy/config/secrets.yml
249
+ - test/dummy/config/routes.rb
250
+ - test/dummy/config/locales/en.yml
255
251
  - test/dummy/config/environments/production.rb
252
+ - test/dummy/config/environments/development.rb
256
253
  - test/dummy/config/environments/test.rb
257
- - test/dummy/config/initializers/assets.rb
254
+ - test/dummy/config/environment.rb
255
+ - test/dummy/config/application.rb
256
+ - test/dummy/config/database.yml
257
+ - test/dummy/config/boot.rb
258
258
  - test/dummy/config/initializers/backtrace_silencers.rb
259
- - test/dummy/config/initializers/cookies_serializer.rb
260
- - test/dummy/config/initializers/filter_parameter_logging.rb
261
- - test/dummy/config/initializers/inflections.rb
262
259
  - test/dummy/config/initializers/mime_types.rb
260
+ - test/dummy/config/initializers/filter_parameter_logging.rb
263
261
  - test/dummy/config/initializers/session_store.rb
264
262
  - test/dummy/config/initializers/wrap_parameters.rb
265
- - test/dummy/config/locales/en.yml
266
- - test/dummy/config/routes.rb
267
- - test/dummy/config/secrets.yml
263
+ - test/dummy/config/initializers/assets.rb
264
+ - test/dummy/config/initializers/cookies_serializer.rb
265
+ - test/dummy/config/initializers/inflections.rb
268
266
  - test/dummy/config.ru
269
- - test/dummy/db/test.sqlite3
270
- - test/dummy/log/test.log
271
- - test/dummy/public/404.html
267
+ - test/dummy/Rakefile
268
+ - test/dummy/public/favicon.ico
272
269
  - test/dummy/public/422.html
273
270
  - test/dummy/public/500.html
274
- - test/dummy/public/favicon.ico
275
- - test/dummy/Rakefile
271
+ - test/dummy/public/404.html
272
+ - test/dummy/db/test.sqlite3
276
273
  - test/dummy/README.rdoc
277
- - test/job_test.rb
274
+ - test/coney_island_test.rb
278
275
  - test/jobs_cache_test.rb
279
- - test/performer_test.rb
276
+ - test/job_test.rb
277
+ - test/worker_test.rb
280
278
  - test/submitter_test.rb
281
279
  - test/test_helper.rb
282
- - test/worker_test.rb
280
+ - test/performer_test.rb
@@ -1,8 +0,0 @@
1
- ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
2
- ConeyIsland::Submitter.handle_connection connecting...
3
- Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
4
- ConeyIsland::Submitter.handle_connection connecting...
5
- ConeyIsland::Submitter.handle_connection connecting...
6
- Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
7
- ConeyIsland::Submitter.handle_connection connecting...
8
- ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1