que-locks 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd840db1d95e1dc04b8efae206dfd9600423999972af509b37266187d53dd535
4
- data.tar.gz: 3505096ad35333c9b2fb00397e8c3ba5266097f8d180e9a0fb76d5ba9b12e16a
3
+ metadata.gz: 809491912a7146d6ac1d4df762d88efb1e4bc9a1ae037769b937275fea35b502
4
+ data.tar.gz: b562eb878454d0a03939cbbcd3b81371478c7f36aea12c428a568da6ea23dc19
5
5
  SHA512:
6
- metadata.gz: 9aaee5425dc4819614715e3364f608d03bb2985b1a05420acb0fcc7ef500a63398ddfa19137dc6762a9747346cd72bb27747b27cfaa729fc2f56b93e4d833e3f
7
- data.tar.gz: adb3ad01415719ad0845ff3141f3e102a2edde81b2ff9fa68cfe3fac68d41c6c6fdebf76e447e3112a9639c57244baa5f48938903dc1b7c3b8b0405862458935
6
+ metadata.gz: 12a5d34c46c3eadd293885796eedc264b77c751cc5f31ec063e75a6a878f5ec7bec42c1716e51798db3006fa6be44419129e9421da1d012cd8aa1432e668fbb7
7
+ data.tar.gz: 63185315f4926d0d2226c0231e207c9c4417c443f56deac59dd771711a64c142cb1906cce1a8b898b8bc31902279d8f5cc34d4d213b592f5993f1ebc46d44ba7
data/.rubocop.yml CHANGED
@@ -4,6 +4,8 @@ AllCops:
4
4
  - "node_modules/**/*"
5
5
  - "test/scratch/**/*"
6
6
  TargetRubyVersion: 2.6
7
+ NewCops: disable
8
+ SuggestExtensions: false
7
9
 
8
10
  require:
9
11
  - rubocop-performance
@@ -31,3 +33,6 @@ Lint/AmbiguousBlockAssociation:
31
33
 
32
34
  Bundler/OrderedGems:
33
35
  Enabled: false
36
+
37
+ Gemspec/RequiredRubyVersion:
38
+ Enabled: false
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ que-locks
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.4
data/Gemfile CHANGED
@@ -1,22 +1,21 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- gem 'que', '1.0.0.beta3', github: 'chanks/que'
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
4
 
7
5
  # Specify your gem's dependencies in que-locks.gemspec
8
6
  gemspec
9
7
 
10
8
  group :development do
11
- gem 'activerecord'
12
- gem 'pg'
13
- gem 'database_cleaner'
9
+ gem "activerecord"
10
+ gem "activejob"
11
+ gem "pg"
12
+ gem "database_cleaner"
14
13
 
15
- gem 'minitest'
14
+ gem "minitest"
15
+ gem "mocha"
16
16
 
17
- gem 'byebug'
18
- gem 'rufo'
19
- gem 'rubocop'
20
- gem 'rubocop-performance'
17
+ gem "byebug"
18
+ gem "rufo"
19
+ gem "rubocop"
20
+ gem "rubocop-performance"
21
21
  end
22
-
data/Gemfile.lock CHANGED
@@ -1,75 +1,89 @@
1
- GIT
2
- remote: https://github.com/chanks/que
3
- revision: 53106609b24d7e8bc231ae3883f69dca8c989d9d
4
- specs:
5
- que (1.0.0.beta3)
6
-
7
1
  PATH
8
2
  remote: .
9
3
  specs:
10
- que-locks (0.2.0)
11
- neatjson
12
- que (~> 1.0.0.beta3)
13
- xxhash
4
+ que-locks (0.3.0)
5
+ neatjson (~> 0.9)
6
+ que (~> 1.0)
7
+ xxhash (~> 0.4)
14
8
 
15
9
  GEM
16
10
  remote: https://rubygems.org/
17
11
  specs:
18
- activemodel (6.0.1)
19
- activesupport (= 6.0.1)
20
- activerecord (6.0.1)
21
- activemodel (= 6.0.1)
22
- activesupport (= 6.0.1)
23
- activesupport (6.0.1)
12
+ activejob (6.1.6.1)
13
+ activesupport (= 6.1.6.1)
14
+ globalid (>= 0.3.6)
15
+ activemodel (6.1.6.1)
16
+ activesupport (= 6.1.6.1)
17
+ activerecord (6.1.6.1)
18
+ activemodel (= 6.1.6.1)
19
+ activesupport (= 6.1.6.1)
20
+ activesupport (6.1.6.1)
24
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
- i18n (>= 0.7, < 2)
26
- minitest (~> 5.1)
27
- tzinfo (~> 1.1)
28
- zeitwerk (~> 2.2)
29
- ast (2.4.0)
30
- byebug (11.0.1)
31
- concurrent-ruby (1.1.5)
32
- database_cleaner (1.7.0)
33
- i18n (1.7.0)
22
+ i18n (>= 1.6, < 2)
23
+ minitest (>= 5.1)
24
+ tzinfo (~> 2.0)
25
+ zeitwerk (~> 2.3)
26
+ ast (2.4.2)
27
+ byebug (11.1.3)
28
+ concurrent-ruby (1.1.10)
29
+ database_cleaner (2.0.1)
30
+ database_cleaner-active_record (~> 2.0.0)
31
+ database_cleaner-active_record (2.0.1)
32
+ activerecord (>= 5.a)
33
+ database_cleaner-core (~> 2.0.0)
34
+ database_cleaner-core (2.0.1)
35
+ globalid (1.0.0)
36
+ activesupport (>= 5.0)
37
+ i18n (1.12.0)
34
38
  concurrent-ruby (~> 1.0)
35
- jaro_winkler (1.5.4)
36
- minitest (5.13.0)
39
+ json (2.6.2)
40
+ minitest (5.16.2)
41
+ mocha (1.14.0)
37
42
  neatjson (0.9)
38
- parallel (1.19.1)
39
- parser (2.6.5.0)
40
- ast (~> 2.4.0)
41
- pg (1.1.4)
42
- rainbow (3.0.0)
43
+ parallel (1.22.1)
44
+ parser (3.1.2.0)
45
+ ast (~> 2.4.1)
46
+ pg (1.4.2)
47
+ que (1.4.1)
48
+ rainbow (3.1.1)
43
49
  rake (10.5.0)
44
- rubocop (0.76.0)
45
- jaro_winkler (~> 1.5.1)
50
+ regexp_parser (2.5.0)
51
+ rexml (3.2.5)
52
+ rubocop (1.32.0)
53
+ json (~> 2.3)
46
54
  parallel (~> 1.10)
47
- parser (>= 2.6)
55
+ parser (>= 3.1.0.0)
48
56
  rainbow (>= 2.2.2, < 4.0)
57
+ regexp_parser (>= 1.8, < 3.0)
58
+ rexml (>= 3.2.5, < 4.0)
59
+ rubocop-ast (>= 1.19.1, < 2.0)
49
60
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 1.7)
51
- rubocop-performance (1.5.1)
52
- rubocop (>= 0.71.0)
53
- ruby-progressbar (1.10.1)
54
- rufo (0.7.0)
55
- thread_safe (0.3.6)
56
- tzinfo (1.2.5)
57
- thread_safe (~> 0.1)
58
- unicode-display_width (1.6.0)
59
- xxhash (0.4.0)
60
- zeitwerk (2.2.1)
61
+ unicode-display_width (>= 1.4.0, < 3.0)
62
+ rubocop-ast (1.19.1)
63
+ parser (>= 3.1.1.0)
64
+ rubocop-performance (1.14.3)
65
+ rubocop (>= 1.7.0, < 2.0)
66
+ rubocop-ast (>= 0.4.0)
67
+ ruby-progressbar (1.11.0)
68
+ rufo (0.13.0)
69
+ tzinfo (2.0.5)
70
+ concurrent-ruby (~> 1.0)
71
+ unicode-display_width (2.2.0)
72
+ xxhash (0.5.0)
73
+ zeitwerk (2.6.0)
61
74
 
62
75
  PLATFORMS
63
76
  ruby
64
77
 
65
78
  DEPENDENCIES
79
+ activejob
66
80
  activerecord
67
- bundler (~> 1.17)
81
+ bundler (~> 2.0)
68
82
  byebug
69
83
  database_cleaner
70
84
  minitest
85
+ mocha
71
86
  pg
72
- que (= 1.0.0.beta3)!
73
87
  que-locks!
74
88
  rake (~> 10.0)
75
89
  rubocop
@@ -77,4 +91,4 @@ DEPENDENCIES
77
91
  rufo
78
92
 
79
93
  BUNDLED WITH
80
- 1.17.2
94
+ 2.3.18
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # Que::Locks
1
+ # Que::Locks ![Ruby](https://github.com/airhorns/que-locks/workflows/Ruby/badge.svg)
2
2
 
3
- `que-locks` adds an opt-in feature to `Que::Jobs` allowing jobs to specify that exactly one instance of a job should be executing at once. This is useful for jobs that are doing something important that should only ever happen one at a time, like processing a payment for a given user, or super expensive jobs that could cause thundering herd problems if enqueued all at the same time.
3
+ `que-locks` adds an opt-in exclusive execution lock to [Que](https://github.com/que-rb/que), a robust and simple Postgres based background job library. Jobs can specify that exactly one instance of a job should be executing at once and `que-locks` will prevent the enqueuing and execution of any other instance of the same job with the same arguments. This is useful for jobs that are doing something important that should only ever happen one at a time, like processing a payment for a given user, or super expensive jobs that could cause thundering herd problems if enqueued all at the same time.
4
4
 
5
- `que-locks` uses Postgres' advisory locks in a similar manner as que `0.x` did to provide scalable and automatically cleaned up locking around job execution. `que-locks` provides slightly better atomicity guarantees compared to the locking functionality of Redis based job queues for the same reasons `que` can as well. Because locks are taken and released using the same database connection that the `que` worker uses to pull jobs, the transactional semantics apply just the same where locks are automatically released if the connection fails, unlike the multistep Redis logic that requires complicated crash cleanup.
5
+ `que-locks` uses Postgres' advisory locks in a similar manner as que does to provide scalable and automatically cleaned-up-locking around job execution. `que-locks` provides slightly better atomicity guarantees compared to the locking functionality of Redis based job queues for the same reasons `que` can as well! Because locks are taken and released using the same database connection that the `que` worker uses to pull jobs, the robust transactional semantics Postgres provides apply just the same. Locks are automatically released if the connection fails, and don't require heart-beating beyond what the Postgres client already does, unlike the multi-step Redis logic that requires lock TTLs, heartbeats, and complicated crash cleanup.
6
6
 
7
- This is also sometimes called "unique jobs", "job concurrency limiting", and "exclusive jobs".
7
+ This is also sometimes called _unique jobs_, _serialized jobs_, _job concurrency limiting_, and/or _exclusive jobs_.
8
8
 
9
9
  ## Installation
10
10
 
@@ -16,11 +16,15 @@ gem 'que-locks'
16
16
 
17
17
  And then execute:
18
18
 
19
- $ bundle
19
+ ```
20
+ $ bundle
21
+ ```
20
22
 
21
23
  Or install it yourself as:
22
24
 
23
- $ gem install que-locks
25
+ ```
26
+ $ gem install que-locks
27
+ ```
24
28
 
25
29
  ## Usage
26
30
 
@@ -38,43 +42,69 @@ end
38
42
 
39
43
  That's it!
40
44
 
41
- #### Checking lock status
45
+ ## Configuration (Important!)
46
+
47
+ Right now, `que-locks` does __not__ support Que running with a `--worker-count` greater than 1! This is because the locking strategy is not compatible with the way Que uses its connection pool. This is a big limitation we hope to remove, but please note that you must run Que with one worker per process when using `que-locks`.
48
+
49
+ ### Checking lock status
42
50
 
43
51
  Occasionally, code enqueuing a job might want to check if the job is already running and do something different if it is, like display a message to the user or log the skipped execution. `que-locks` supports some basic job lock introspection like so:
44
52
 
45
53
  ```ruby
46
- SomeJobClass.exclusive_execution_lock #=> returns true if the job is indeed using que-locks
54
+ SomeJob.exclusive_execution_lock #=> returns true if the job is indeed using que-locks
47
55
 
48
- SomeJobClass.lock_available?(user_id: 1) #=> returns true if no job is currently enqueued with these arguments or running right now holding the lock
56
+ SomeJob.lock_available?(user_id: 1) #=> returns true if no job is currently enqueued with these arguments or running right now holding the lock
49
57
  ```
50
58
 
51
- Note that checking the lock's availability reports on the current state of the locks, but that state might change in between when the check is made and if/when the job is enqueued with the same arguments. Put differently, the `#lock_available?` method is advisory to user code, and doesn't actaully reserve the lock or execute a compare-and-swap operation. It's safe for multiple processes to race to enqueue a job after checking to see that the lock is available, as only one will still be executed, but they may both report that the lock was available before enqueuing.
59
+ **Note**: Checking the lock's availability reports on the current state of the locks, but that state might change in between when the check is made and if/when the job is enqueued with the same arguments. Put differently, the `#lock_available?` method is advisory to user code, and doesn't actually reserve the lock or execute a compare-and-swap operation. It's safe for multiple processes to race to enqueue a job after checking to see that the lock is available, as only one will still be executed, but they may both report that the lock was available before enqueuing.
52
60
 
53
61
  ## Semantics
54
62
 
55
- `que-locks` guarantees that the maximum number of instances given job class executing with a given set of arguments will be one. This means that:
63
+ `que-locks` guarantees that the maximum number of instances of a given job class executing with a given set of arguments will be one. This means that:
56
64
 
65
+ - two of the same job class each pushed with the same arguments may result in one or two executions, but they won't ever be simultaneous
57
66
  - two of the same job class each pushed with different arguments can both execute simultaneously
58
67
  - if the job takes no arguments, there can only ever be one executing globally
59
- - two of the same job class each pushed with the same arguments may result in one or two executions, but they won't ever be simultaneous
60
68
 
61
- In some instances, multiple jobs with the same arguments can be enqueued and sit in the queue simultaneously. Despite this the semantics above will remain in tact: only one job will execute at once. The first one worked will get the lock and the second one worked will skip execution if the first job is still executing. `que-locks` tries to avoid extraneous job pushes by checking to see if the lock for a job is available at enqueue time, and skipping enqueue if so. This preemptive lock check helps keeps queues small in the event that a huge number of identical jobs are pushed at once.
69
+ In some instances, multiple jobs with the same class and arguments can be enqueued and sit in the queue simultaneously. Despite this, the semantics above will remain in tact: only one job will execute at once. The first one dequeued will get the lock, and the second one dequeued will skip execution if the first job is still executing when it checks. If 100 of the same job class are enqueued all at the same time with the same arguments, only one will run simultaneously, but that more than one might run by the time the queue is empty.
62
70
 
63
71
  `que-locks` uses a sorted JSON serialized version of the arguments to compute lock keys, so it's important that arguments that should be considered identical JSON serialize using `Que.serialize_json` to the exact same string.
64
72
 
65
73
  `que-locks` adds no overhead to jobs that don't use locking, adds one more SQL query to check an advisory lock (which is only memory access) to enqueuing jobs, and adds two more SQL queries to lock and unlock to job execution.
66
74
 
75
+ ### Preemptive lock checking (dropped enqueues)
76
+
77
+ `que-locks` tries to avoid extraneous job pushes by checking to see if the lock for a job is available at enqueue time, and skipping enqueue for the job if so. This means that if you enqueue 100 jobs all at once, likely very few will end up executing total because the first job executed will take out the lock and the preemptive enqueue check for the jobs yet to be enqueued will start failing. This preemptive lock check helps keeps queues small in the event that a huge number of identical jobs are pushed at once. It is worth noting that this job dropping behaviour happens already at dequeue time as well if the lock is already out, and this is just doing the check earlier in the process to enqueue fewer jobs.
78
+
79
+ In some instances this may be undesirable if the job must absolutely run. In this instance, we suggest not using an execution lock, but, you may still want control over how many are running at once. One alternative is pushing some kind of idempotency token or further identifier as one of the job's arguments to change the lock key such that the dropped jobs are ok to drop.
80
+
81
+ Otherwise, we suggest throttling the concurrency of a given `que` queue name by controlling the number of que workers working it, and enqueuing the jobs that must not run simultaneously to that queue name.
82
+
83
+ ```ruby
84
+ class ProcessCreditCardJob < Que::Job
85
+ self.queue = 'remote_api_jobs'
86
+ end
87
+
88
+ # and then run que against that queue with a limited worker count to take it easy on the remote API
89
+ # que --queue-name remote_api_jobs --worker-count 2
90
+ ```
91
+
92
+ See https://github.com/que-rb/que/tree/master/docs#multiple-queues for more information on setting concurrency for multiple queue names.
93
+
94
+ It can be tricky to puzzle out if you have a job locking or a job concurrency limiting problem. A good rule of thumb to identify a locking problem is to ask if the jobs are idempotent or redundant if simultaneously executed. If they are, and it is indeed ok to drop jobs from existence if they happen to run at the same time as a clone is running, it's a locking problem that optimizes from doing redundant work. If all jobs must be run, even if they take the exact same arguments, but they maybe just need to be serialized such that only one runs at once, a concurrency limiting approach applies better.
95
+
67
96
  ## Missing features
68
97
 
69
98
  - Configurable preemptive lock checking at enqueue time
70
99
  - Selective argument comparison for lock key computation
71
100
  - maybe a `que-web` integration to expose lock info
101
+ - ActiveJob integration for Rails users. It'd be nice for those who prefer the ActiveJob::Job API to use `que-locks` for nice transactional locking semantics, but this doesn't exist yet. In the meantime, we suggest using `Que::Job` directly.
72
102
 
73
103
  If you wish for any of this stuff, feel free to open a PR, contributions are always welcome!!
74
104
 
75
105
  ## Non features
76
106
 
77
- - Locking to a limited concurrency greater than 1. If you want a lock that several different jobs can take out, a good option is to use Que's multiple queue support and run a limited number of workers working a certain queue so the concurrency is limited by the available worker slots.
107
+ - Locking to a limited concurrency greater than 1. Also called semaphore tickets. If you want a lock that several different jobs can take out, a good option is to use Que's multiple queue support and run a limited number of workers working a certain queue so the concurrency is limited by the available worker slots. This is absent because it adds a lot of complexity to the locking code as Postgres doesn't natively support these cross-session, stacking advisory locks.
78
108
 
79
109
  ## Development
80
110
 
@@ -84,7 +114,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
84
114
 
85
115
  ## Contributing
86
116
 
87
- Bug reports and pull requests are welcome on GitHub at https://github.com/hornairs/que-locks. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
117
+ Bug reports and pull requests are welcome on GitHub at https://github.com/airhorns/que-locks. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
88
118
 
89
119
  ## License
90
120
 
@@ -93,7 +123,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
93
123
  ## Code of Conduct
94
124
 
95
125
  Everyone interacting in the Que::Locks project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hornairs/que-locks/blob/master/CODE_OF_CONDUCT.md).
96
-
97
- ```
98
-
99
- ```
@@ -0,0 +1,12 @@
1
+ version: '3.2'
2
+
3
+ services:
4
+ postgres:
5
+ image: postgres:12
6
+ ports:
7
+ - 5432:5432
8
+ restart: on-failure
9
+ environment:
10
+ POSTGRES_USER: que_locks
11
+ POSTGRES_DB: que_locks_test
12
+ POSTGRES_HOST_AUTH_METHOD: trust # don't require password
@@ -2,25 +2,34 @@ module Que::Locks
2
2
  module JobExtensions
3
3
  attr_accessor :exclusive_execution_lock
4
4
 
5
- def lock_available?(*args, queue: nil, priority: nil, run_at: nil, job_class: nil, tags: nil, **arg_opts) # rubocop:disable Lint/UnusedMethodArgument
6
- args << arg_opts if arg_opts.any?
5
+ def lock_available?(*args, queue: nil, priority: nil, run_at: nil, job_class: nil, tags: nil, job_options: {}, **kwargs) # rubocop:disable Lint/UnusedMethodArgument
6
+ args << kwargs if kwargs.any?
7
7
  return true unless self.exclusive_execution_lock
8
8
  return false if Que::Locks::ExecutionLock.already_enqueued_job_wanting_lock?(self, args)
9
9
  return Que::Locks::ExecutionLock.can_aquire?(self, args)
10
10
  end
11
11
 
12
- def enqueue(*args, queue: nil, priority: nil, run_at: nil, job_class: nil, tags: nil, **arg_opts)
12
+ def enqueue(*args, queue: nil, priority: nil, run_at: nil, job_class: nil, tags: nil, job_options: {}, **kwargs)
13
+ forwardable_kwargs = kwargs.clone
14
+ forwardable_kwargs[:job_options] = {
15
+ queue: queue,
16
+ priority: priority,
17
+ run_at: run_at,
18
+ job_class: job_class,
19
+ tags: tags,
20
+ }.merge(job_options)
21
+
13
22
  if self.exclusive_execution_lock
14
23
  args_list = args.clone
15
- args_list << arg_opts if arg_opts.any?
24
+ args_list << kwargs if kwargs.any?
16
25
 
17
26
  if Que::Locks::ExecutionLock.already_enqueued_job_wanting_lock?(self, args_list)
18
27
  Que.log(level: :info, event: :skipped_enqueue_due_to_preemptive_lock_check, args: args_list)
19
28
  else
20
- super
29
+ super(*args, **forwardable_kwargs)
21
30
  end
22
31
  else
23
- super
32
+ super(*args, **forwardable_kwargs)
24
33
  end
25
34
  end
26
35
  end
@@ -1,5 +1,5 @@
1
1
  module Que
2
2
  module Locks
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0".freeze
4
4
  end
5
5
  end
data/que-locks.gemspec CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "que/locks/version"
@@ -22,10 +21,10 @@ Gem::Specification.new do |spec|
22
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
22
  spec.require_paths = ["lib"]
24
23
 
25
- spec.add_development_dependency "bundler", "~> 1.17"
24
+ spec.add_development_dependency "bundler", '~> 2.0'
26
25
  spec.add_development_dependency "rake", "~> 10.0"
27
26
 
28
- spec.add_dependency "neatjson"
29
- spec.add_dependency "que", "~> 1.0.0.beta3"
30
- spec.add_dependency "xxhash"
27
+ spec.add_dependency "neatjson", '~> 0.9'
28
+ spec.add_dependency "que", "~> 1.0"
29
+ spec.add_dependency "xxhash", '~> 0.4'
31
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que-locks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Brundage
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2022-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,44 +42,44 @@ dependencies:
42
42
  name: neatjson
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.9'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.9'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: que
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0.beta3
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0.beta3
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: xxhash
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '0.4'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '0.4'
83
83
  description:
84
84
  email:
85
85
  - harry.brundage@gmail.com
@@ -89,6 +89,8 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rubocop.yml"
92
+ - ".ruby-gemset"
93
+ - ".ruby-version"
92
94
  - CODE_OF_CONDUCT.md
93
95
  - Gemfile
94
96
  - Gemfile.lock
@@ -99,6 +101,7 @@ files:
99
101
  - bin/lint
100
102
  - bin/lintfix
101
103
  - bin/setup
104
+ - docker-compose.yml
102
105
  - lib/que/locks.rb
103
106
  - lib/que/locks/execution_lock.rb
104
107
  - lib/que/locks/job_extensions.rb
@@ -125,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
128
  - !ruby/object:Gem::Version
126
129
  version: '0'
127
130
  requirements: []
128
- rubygems_version: 3.0.3
131
+ rubygems_version: 3.0.6
129
132
  signing_key:
130
133
  specification_version: 4
131
134
  summary: Job locking for que jobs such that only one can be in the queue or executing