que 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +8 -8
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Dockerfile +1 -1
- data/README.md +2 -1
- data/docker-compose.yml +2 -2
- data/docs/README.md +3 -3
- data/lib/que/active_job/extensions.rb +2 -0
- data/lib/que/locker.rb +9 -0
- data/lib/que/version.rb +1 -1
- data/lib/que.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ab8266596317c607383b8041784ef57580260a1823ff62f7e25da2171eda072
|
4
|
+
data.tar.gz: 7af7354cb7d22d69c97070c7ef4fd075adb23af081ab75f56d587e73a940e208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37cbca060d09e4925d6869bee31365c315e274e7d02f9c6bfe6d866082bda4265c890785e04ed740a1d969e282b44dc38bde0accfe7c033ac170ddb136573c91
|
7
|
+
data.tar.gz: addec5796eedda7f4dd6561445b387f9066cb2096d583d33f562fb7768af15705384677ca7401086a99c012deb432cdbf138c4ca4e81b09bcbf1f010fa1924ce
|
data/.github/workflows/tests.yml
CHANGED
@@ -7,17 +7,17 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby_version: ['2.7', '3.0', '3.1']
|
11
|
-
rails_gemfile: ['6.0', '6.1']
|
10
|
+
ruby_version: ['2.7', '3.0', '3.1', '3.2']
|
11
|
+
rails_gemfile: ['6.0', '6.1', '7.0']
|
12
12
|
postgres_version: ['14']
|
13
13
|
include:
|
14
14
|
# Postgres versions
|
15
|
-
- { ruby_version: '3.
|
16
|
-
- { ruby_version: '3.
|
17
|
-
- { ruby_version: '3.
|
18
|
-
- { ruby_version: '3.
|
19
|
-
- { ruby_version: '3.
|
20
|
-
- { ruby_version: '3.
|
15
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '9' }
|
16
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '10' }
|
17
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '11' }
|
18
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '12' }
|
19
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '13' }
|
20
|
+
- { ruby_version: '3.2', rails_gemfile: '7.0', postgres_version: '14' }
|
21
21
|
exclude: []
|
22
22
|
name: "Test: Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_gemfile }}, PostgreSQL ${{ matrix.postgres_version }}"
|
23
23
|
services:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.2
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
<!-- MarkdownTOC autolink=true -->
|
4
4
|
|
5
|
+
- [2.2.1 \(2023-04-28\)](#221-2023-04-28)
|
5
6
|
- [2.2.0 \(2022-08-29\)](#220-2022-08-29)
|
6
7
|
- [2.1.0 \(2022-08-25\)](#210-2022-08-25)
|
7
8
|
- [2.0.0 \(2022-08-25\)](#200-2022-08-25)
|
@@ -56,6 +57,11 @@
|
|
56
57
|
|
57
58
|
<!-- /MarkdownTOC -->
|
58
59
|
|
60
|
+
## 2.2.1 (2023-04-28)
|
61
|
+
|
62
|
+
- **Fixed**:
|
63
|
+
+ Fixed support for ActiveJob in Ruby 3.2. [#390](https://github.com/que-rb/que/pull/390)
|
64
|
+
|
59
65
|
## 2.2.0 (2022-08-29)
|
60
66
|
|
61
67
|
- **Changed**:
|
data/Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM ruby:3.
|
1
|
+
FROM ruby:3.2.2-slim-buster@sha256:005f0892d160a4f80f8f89116ec15fddc81f296cd4083db9d59accaed125e270 AS base
|
2
2
|
|
3
3
|
# Install libpq-dev in our base layer, as it's needed in all environments
|
4
4
|
RUN apt-get update \
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ class CreateQueSchema < ActiveRecord::Migration[6.0]
|
|
59
59
|
# Whenever you use Que in a migration, always specify the version you're
|
60
60
|
# migrating to. If you're unsure what the current version is, check the
|
61
61
|
# changelog.
|
62
|
-
Que.migrate!(version:
|
62
|
+
Que.migrate!(version: 7)
|
63
63
|
end
|
64
64
|
|
65
65
|
def down
|
@@ -191,6 +191,7 @@ These projects are tested to be compatible with Que 1.x:
|
|
191
191
|
- [que-web](https://github.com/statianzo/que-web) is a Sinatra-based UI for inspecting your job queue.
|
192
192
|
- [que-scheduler](https://github.com/hlascelles/que-scheduler) lets you schedule tasks using a cron style config file.
|
193
193
|
- [que-locks](https://github.com/airhorns/que-locks) lets you lock around job execution for so only one job runs at once for a set of arguments.
|
194
|
+
- [que-unique](https://github.com/bambooengineering/que-unique) provides fast in-memory `enqueue` deduping.
|
194
195
|
|
195
196
|
If you have a project that uses or relates to Que, feel free to submit a PR adding it to the list!
|
196
197
|
|
data/docker-compose.yml
CHANGED
@@ -10,7 +10,7 @@ services:
|
|
10
10
|
- db
|
11
11
|
volumes:
|
12
12
|
- .:/work
|
13
|
-
- ruby-3.
|
13
|
+
- ruby-3.2.2-gem-cache:/usr/local/bundle
|
14
14
|
- ~/.docker-rc.d/:/.docker-rc.d/:ro
|
15
15
|
working_dir: /work
|
16
16
|
entrypoint: /work/scripts/docker-entrypoint
|
@@ -44,4 +44,4 @@ services:
|
|
44
44
|
|
45
45
|
volumes:
|
46
46
|
db-data: ~
|
47
|
-
ruby-3.
|
47
|
+
ruby-3.2.2-gem-cache: ~
|
data/docs/README.md
CHANGED
@@ -139,8 +139,8 @@ There are other docs to read if you're using [Sequel](#using-sequel) or [plain P
|
|
139
139
|
After you've connected Que to the database, you can manage the jobs table. You'll want to migrate to a specific version in a migration file, to ensure that they work the same way even when you upgrade Que in the future:
|
140
140
|
|
141
141
|
```ruby
|
142
|
-
# Update the schema to version #
|
143
|
-
Que.migrate!(version:
|
142
|
+
# Update the schema to version #7.
|
143
|
+
Que.migrate!(version: 7)
|
144
144
|
|
145
145
|
# Remove Que's jobs table entirely.
|
146
146
|
Que.migrate!(version: 0)
|
@@ -553,7 +553,7 @@ require 'que'
|
|
553
553
|
Sequel.migration do
|
554
554
|
up do
|
555
555
|
Que.connection = self
|
556
|
-
Que.migrate!(version:
|
556
|
+
Que.migrate!(version: 7)
|
557
557
|
end
|
558
558
|
down do
|
559
559
|
Que.connection = self
|
@@ -10,6 +10,7 @@ module Que
|
|
10
10
|
def run(*args)
|
11
11
|
raise Error, "Job class #{self.class} didn't define a run() method!"
|
12
12
|
end
|
13
|
+
ruby2_keywords(:run) if respond_to?(:ruby2_keywords, true)
|
13
14
|
|
14
15
|
def perform(*args)
|
15
16
|
args, kwargs = Que.split_out_ruby2_keywords(args)
|
@@ -31,6 +32,7 @@ module Que
|
|
31
32
|
),
|
32
33
|
)
|
33
34
|
end
|
35
|
+
ruby2_keywords(:perform) if respond_to?(:ruby2_keywords, true)
|
34
36
|
|
35
37
|
private
|
36
38
|
|
data/lib/que/locker.rb
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
require 'set'
|
8
8
|
|
9
9
|
module Que
|
10
|
+
class << self
|
11
|
+
attr_accessor :locker
|
12
|
+
end
|
13
|
+
|
10
14
|
Listener::MESSAGE_FORMATS[:job_available] =
|
11
15
|
{
|
12
16
|
queue: String,
|
@@ -71,6 +75,11 @@ module Que
|
|
71
75
|
Que.assert Array, worker_priorities
|
72
76
|
worker_priorities.each { |p| Que.assert([Integer, NilClass], p) }
|
73
77
|
|
78
|
+
# We assign this globally because we only ever expect one locker to be
|
79
|
+
# created per worker process. This can be used by middleware or external
|
80
|
+
# code to access the locker during runtime.
|
81
|
+
Que.locker = self
|
82
|
+
|
74
83
|
# We use a JobBuffer to track jobs and pass them to workers, and a
|
75
84
|
# ResultQueue to receive messages from workers.
|
76
85
|
@job_buffer = JobBuffer.new(
|
data/lib/que/version.rb
CHANGED
data/lib/que.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hanks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.4.10
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A PostgreSQL-based Job Queue
|