activejob-traffic_control 0.1.2 → 0.1.3

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
2
  SHA1:
3
- metadata.gz: 511ad5f30c21f83e11d8f6918f145c4fb0d73d9e
4
- data.tar.gz: c39128c8888ce24cc9d0b0341763a259ae40d54c
3
+ metadata.gz: 3274bbf88b52e621a534d2ad9f9d62916fe83121
4
+ data.tar.gz: 92c9748318ce6fc4e37ce933f8fc261afcc8ebf7
5
5
  SHA512:
6
- metadata.gz: 6db8cce696dfeb0b984b7bc8abf9dd1f591c9d8fa3f1ce83536c5d05a91517b03fb35ae32f8e64a8f5427bd47b1f4689c182775d6cc54ea765c9305f278667ba
7
- data.tar.gz: 55b4efb468ba9771612992816b615a5bc93f70b9adf2233c1fe12d6875548917f1300cbad99a9cbeff0fda40c30b731e36ef0ce1b0d77a5004f1ef7014b51fbd
6
+ metadata.gz: a34f484369f3b08f9940ecb144d4646aee3fe0416d89c73e345155d6f625e1d7bec4175d323a648c85cda67404c4068508a1c4e2dea97ea4738b08ce6289c07f
7
+ data.tar.gz: 94dae06ce5f66f47582e4edbc3dc3b240327dd04cd1920d13fbadff8bfd3ed0510b8b8907877f86226edcc31b4071b161686072210f95f0042552c8306e00be9
@@ -1,3 +1,8 @@
1
+ ## 0.1.3
2
+
3
+ - Default concurrency to false to avoid any surprises (thanks Andrew Kane!)
4
+ - Include all TrafficControl features by default, and update docs (thanks Andrew Kane!)
5
+
1
6
  ## 0.1.2
2
7
 
3
8
  - Use #class_attribute instead of #attr_accessor for various configuration (thanks avokhmin!)
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_job"
4
- require "active_support/all"
3
+ require "active_support"
5
4
  require "suo"
6
5
 
7
6
  require "active_job/traffic_control/version"
@@ -8,7 +8,7 @@ module ActiveJob
8
8
  CONCURRENCY_REENQUEUE_DELAY = ENV["RACK_ENV"] == "test" ? 1...5 : 30...(60 * 5)
9
9
 
10
10
  class_methods do
11
- def concurrency(threshold, drop: true, key: nil, wait_timeout: 0.1, stale_timeout: 60 * 10)
11
+ def concurrency(threshold, drop: false, key: nil, wait_timeout: 0.1, stale_timeout: 60 * 10)
12
12
  raise ArgumentError, "Concurrent jobs needs to be an integer > 0" if threshold.to_i < 1
13
13
 
14
14
  self.job_concurrency = {
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveJob
4
4
  module TrafficControl
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
@@ -0,0 +1,7 @@
1
+ require "active_job/traffic_control"
2
+
3
+ ActiveSupport.on_load(:active_job) do
4
+ include ActiveJob::TrafficControl::Concurrency
5
+ include ActiveJob::TrafficControl::Throttle
6
+ include ActiveJob::TrafficControl::Disable
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob-traffic_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Elser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-13 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -146,6 +146,7 @@ files:
146
146
  - lib/active_job/traffic_control/disable.rb
147
147
  - lib/active_job/traffic_control/throttle.rb
148
148
  - lib/active_job/traffic_control/version.rb
149
+ - lib/activejob/traffic_control.rb
149
150
  homepage: https://www.activejobtrafficcontrol.com
150
151
  licenses: []
151
152
  metadata: {}
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  version: '0'
166
167
  requirements: []
167
168
  rubyforge_project:
168
- rubygems_version: 2.5.1
169
+ rubygems_version: 2.5.2
169
170
  signing_key:
170
171
  specification_version: 4
171
172
  summary: Traffic control for ActiveJob