que 0.11.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/tests.yml +51 -0
- data/.gitignore +2 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +502 -97
- data/Dockerfile +20 -0
- data/LICENSE.txt +1 -1
- data/README.md +205 -59
- data/auto/dev +21 -0
- data/auto/pre-push-hook +30 -0
- data/auto/psql +9 -0
- data/auto/test +5 -0
- data/auto/test-postgres-14 +17 -0
- data/bin/que +8 -81
- data/docker-compose.yml +47 -0
- data/docs/README.md +881 -0
- data/lib/que/active_job/extensions.rb +114 -0
- data/lib/que/active_record/connection.rb +51 -0
- data/lib/que/active_record/model.rb +48 -0
- data/lib/que/command_line_interface.rb +259 -0
- data/lib/que/connection.rb +198 -0
- data/lib/que/connection_pool.rb +78 -0
- data/lib/que/job.rb +210 -103
- data/lib/que/job_buffer.rb +255 -0
- data/lib/que/job_methods.rb +176 -0
- data/lib/que/listener.rb +176 -0
- data/lib/que/locker.rb +507 -0
- data/lib/que/metajob.rb +47 -0
- data/lib/que/migrations/4/down.sql +48 -0
- data/lib/que/migrations/4/up.sql +267 -0
- data/lib/que/migrations/5/down.sql +73 -0
- data/lib/que/migrations/5/up.sql +76 -0
- data/lib/que/migrations/6/down.sql +8 -0
- data/lib/que/migrations/6/up.sql +8 -0
- data/lib/que/migrations/7/down.sql +5 -0
- data/lib/que/migrations/7/up.sql +13 -0
- data/lib/que/migrations.rb +37 -18
- data/lib/que/poller.rb +274 -0
- data/lib/que/rails/railtie.rb +12 -0
- data/lib/que/result_queue.rb +35 -0
- data/lib/que/sequel/model.rb +52 -0
- data/lib/que/utils/assertions.rb +62 -0
- data/lib/que/utils/constantization.rb +19 -0
- data/lib/que/utils/error_notification.rb +68 -0
- data/lib/que/utils/freeze.rb +20 -0
- data/lib/que/utils/introspection.rb +50 -0
- data/lib/que/utils/json_serialization.rb +21 -0
- data/lib/que/utils/logging.rb +79 -0
- data/lib/que/utils/middleware.rb +46 -0
- data/lib/que/utils/queue_management.rb +18 -0
- data/lib/que/utils/ruby2_keywords.rb +19 -0
- data/lib/que/utils/transactions.rb +34 -0
- data/lib/que/version.rb +5 -1
- data/lib/que/worker.rb +145 -149
- data/lib/que.rb +103 -159
- data/que.gemspec +17 -4
- data/scripts/docker-entrypoint +14 -0
- data/scripts/test +6 -0
- metadata +59 -95
- data/.rspec +0 -2
- data/.travis.yml +0 -17
- data/Gemfile +0 -24
- data/docs/advanced_setup.md +0 -106
- data/docs/customizing_que.md +0 -200
- data/docs/error_handling.md +0 -47
- data/docs/inspecting_the_queue.md +0 -114
- data/docs/logging.md +0 -50
- data/docs/managing_workers.md +0 -80
- data/docs/migrating.md +0 -30
- data/docs/multiple_queues.md +0 -27
- data/docs/shutting_down_safely.md +0 -7
- data/docs/using_plain_connections.md +0 -41
- data/docs/using_sequel.md +0 -31
- data/docs/writing_reliable_jobs.md +0 -117
- data/lib/generators/que/install_generator.rb +0 -24
- data/lib/generators/que/templates/add_que.rb +0 -13
- data/lib/que/adapters/active_record.rb +0 -54
- data/lib/que/adapters/base.rb +0 -127
- data/lib/que/adapters/connection_pool.rb +0 -16
- data/lib/que/adapters/pg.rb +0 -21
- data/lib/que/adapters/pond.rb +0 -16
- data/lib/que/adapters/sequel.rb +0 -20
- data/lib/que/railtie.rb +0 -16
- data/lib/que/rake_tasks.rb +0 -59
- data/lib/que/sql.rb +0 -152
- data/spec/adapters/active_record_spec.rb +0 -152
- data/spec/adapters/connection_pool_spec.rb +0 -22
- data/spec/adapters/pg_spec.rb +0 -41
- data/spec/adapters/pond_spec.rb +0 -22
- data/spec/adapters/sequel_spec.rb +0 -57
- data/spec/gemfiles/Gemfile1 +0 -18
- data/spec/gemfiles/Gemfile2 +0 -18
- data/spec/spec_helper.rb +0 -118
- data/spec/support/helpers.rb +0 -19
- data/spec/support/jobs.rb +0 -35
- data/spec/support/shared_examples/adapter.rb +0 -37
- data/spec/support/shared_examples/multi_threaded_adapter.rb +0 -46
- data/spec/travis.rb +0 -23
- data/spec/unit/connection_spec.rb +0 -14
- data/spec/unit/customization_spec.rb +0 -251
- data/spec/unit/enqueue_spec.rb +0 -245
- data/spec/unit/helper_spec.rb +0 -12
- data/spec/unit/logging_spec.rb +0 -101
- data/spec/unit/migrations_spec.rb +0 -84
- data/spec/unit/pool_spec.rb +0 -365
- data/spec/unit/run_spec.rb +0 -14
- data/spec/unit/states_spec.rb +0 -50
- data/spec/unit/stats_spec.rb +0 -46
- data/spec/unit/transaction_spec.rb +0 -36
- data/spec/unit/work_spec.rb +0 -407
- data/spec/unit/worker_spec.rb +0 -167
- data/tasks/benchmark.rb +0 -3
- data/tasks/rspec.rb +0 -14
- data/tasks/safe_shutdown.rb +0 -67
data/lib/que.rb
CHANGED
@@ -1,180 +1,124 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'forwardable'
|
4
|
+
require 'socket' # For Socket.gethostname
|
4
5
|
|
5
6
|
module Que
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
CURRENT_HOSTNAME = Socket.gethostname.freeze
|
8
|
+
DEFAULT_QUEUE = 'default'.freeze
|
9
|
+
TIME_REGEX = /\A\d{4}\-\d{2}\-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}Z\z/
|
10
|
+
CONFIG_MUTEX = Mutex.new
|
11
|
+
MAXIMUM_PRIORITY = 32767
|
12
|
+
|
13
|
+
class Error < StandardError; end
|
14
|
+
|
15
|
+
# Store SQL strings frozen, with squashed whitespace so logs read better.
|
16
|
+
SQL = {}
|
17
|
+
def SQL.[]=(k,v); super(k, v.strip.gsub(/\s+/, ' ').freeze); end
|
18
|
+
|
19
|
+
# Load up modules that allow registration before modules that use it.
|
20
|
+
require_relative 'que/listener'
|
21
|
+
|
22
|
+
# Load utilities before main logic that will use them.
|
23
|
+
require_relative 'que/utils/assertions'
|
24
|
+
require_relative 'que/utils/constantization'
|
25
|
+
require_relative 'que/utils/error_notification'
|
26
|
+
require_relative 'que/utils/freeze'
|
27
|
+
require_relative 'que/utils/introspection'
|
28
|
+
require_relative 'que/utils/json_serialization'
|
29
|
+
require_relative 'que/utils/logging'
|
30
|
+
require_relative 'que/utils/middleware'
|
31
|
+
require_relative 'que/utils/queue_management'
|
32
|
+
require_relative 'que/utils/ruby2_keywords'
|
33
|
+
require_relative 'que/utils/transactions'
|
34
|
+
|
35
|
+
require_relative 'que/version'
|
36
|
+
|
37
|
+
require_relative 'que/connection'
|
38
|
+
require_relative 'que/connection_pool'
|
39
|
+
require_relative 'que/job_methods'
|
40
|
+
require_relative 'que/job'
|
41
|
+
require_relative 'que/job_buffer'
|
42
|
+
require_relative 'que/locker'
|
43
|
+
require_relative 'que/metajob'
|
44
|
+
require_relative 'que/migrations'
|
45
|
+
require_relative 'que/poller'
|
46
|
+
require_relative 'que/result_queue'
|
47
|
+
require_relative 'que/worker'
|
20
48
|
|
21
|
-
|
22
|
-
|
23
|
-
INDIFFERENTIATOR = proc do |object|
|
24
|
-
case object
|
25
|
-
when Array
|
26
|
-
object.each(&INDIFFERENTIATOR)
|
27
|
-
when Hash
|
28
|
-
object.default_proc = HASH_DEFAULT_PROC
|
29
|
-
object.each { |key, value| object[key] = INDIFFERENTIATOR.call(value) }
|
30
|
-
object
|
31
|
-
else
|
32
|
-
object
|
33
|
-
end
|
49
|
+
class << self
|
50
|
+
attr_writer :default_queue
|
34
51
|
end
|
35
52
|
|
36
|
-
|
37
|
-
case object
|
38
|
-
when Hash
|
39
|
-
object.keys.each do |key|
|
40
|
-
object[key.to_sym] = SYMBOLIZER.call(object.delete(key))
|
41
|
-
end
|
42
|
-
object
|
43
|
-
when Array
|
44
|
-
object.map! { |e| SYMBOLIZER.call(e) }
|
45
|
-
else
|
46
|
-
object
|
47
|
-
end
|
48
|
-
end
|
53
|
+
self.default_queue = nil
|
49
54
|
|
50
55
|
class << self
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
include Utils::Assertions
|
57
|
+
include Utils::Constantization
|
58
|
+
include Utils::ErrorNotification
|
59
|
+
include Utils::Freeze
|
60
|
+
include Utils::Introspection
|
61
|
+
include Utils::JSONSerialization
|
62
|
+
include Utils::Logging
|
63
|
+
include Utils::Middleware
|
64
|
+
include Utils::QueueManagement
|
65
|
+
include Utils::Ruby2Keywords
|
66
|
+
include Utils::Transactions
|
67
|
+
|
68
|
+
extend Forwardable
|
69
|
+
|
70
|
+
# Copy some commonly-used methods here, for convenience.
|
71
|
+
def_delegators :pool, :execute, :checkout, :in_transaction?
|
72
|
+
def_delegators Job, :enqueue, :bulk_enqueue, :run_synchronously, :run_synchronously=
|
73
|
+
def_delegators Migrations, :db_version, :migrate!
|
74
|
+
|
75
|
+
# Global configuration logic.
|
76
|
+
attr_accessor :use_prepared_statements
|
77
|
+
|
78
|
+
def default_queue
|
79
|
+
@default_queue || DEFAULT_QUEUE
|
80
|
+
end
|
81
|
+
|
82
|
+
# Support simple integration with many common connection pools.
|
83
|
+
def connection=(conn)
|
84
|
+
self.connection_proc =
|
85
|
+
if conn.to_s == 'ActiveRecord'
|
86
|
+
# Load and setup AR compatibility.
|
87
|
+
require_relative 'que/active_record/connection'
|
88
|
+
m = Que::ActiveRecord::Connection::JobMiddleware
|
89
|
+
job_middleware << m unless job_middleware.include?(m)
|
90
|
+
Que::ActiveRecord::Connection.method(:checkout)
|
58
91
|
else
|
59
|
-
case
|
60
|
-
when 'Sequel::Postgres::Database' then
|
61
|
-
when '
|
62
|
-
when '
|
63
|
-
when '
|
64
|
-
|
65
|
-
else raise "Que connection not recognized: #{connection.inspect}"
|
92
|
+
case conn.class.to_s
|
93
|
+
when 'Sequel::Postgres::Database' then conn.method(:synchronize)
|
94
|
+
when 'Pond' then conn.method(:checkout)
|
95
|
+
when 'ConnectionPool' then conn.method(:with)
|
96
|
+
when 'NilClass' then conn
|
97
|
+
else raise Error, "Unsupported connection: #{conn.class}"
|
66
98
|
end
|
67
99
|
end
|
68
100
|
end
|
69
101
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
def execute(*args)
|
75
|
-
adapter.execute(*args)
|
76
|
-
end
|
77
|
-
|
78
|
-
def clear!
|
79
|
-
execute "DELETE FROM que_jobs"
|
80
|
-
end
|
81
|
-
|
82
|
-
def job_stats
|
83
|
-
execute :job_stats
|
84
|
-
end
|
85
|
-
|
86
|
-
def worker_states
|
87
|
-
execute :worker_states
|
88
|
-
end
|
89
|
-
|
90
|
-
# Give us a cleaner interface when specifying a job_class as a string.
|
91
|
-
def enqueue(*args)
|
92
|
-
Job.enqueue(*args)
|
93
|
-
end
|
94
|
-
|
95
|
-
def db_version
|
96
|
-
Migrations.db_version
|
97
|
-
end
|
98
|
-
|
99
|
-
def migrate!(version = {:version => Migrations::CURRENT_VERSION})
|
100
|
-
Migrations.migrate!(version)
|
101
|
-
end
|
102
|
-
|
103
|
-
# Have to support create! and drop! in old migrations. They just created
|
104
|
-
# and dropped the bare table.
|
105
|
-
def create!
|
106
|
-
migrate! :version => 1
|
107
|
-
end
|
108
|
-
|
109
|
-
def drop!
|
110
|
-
migrate! :version => 0
|
111
|
-
end
|
112
|
-
|
113
|
-
def log(data)
|
114
|
-
level = data.delete(:level) || :info
|
115
|
-
data = {:lib => 'que', :hostname => Socket.gethostname, :pid => Process.pid, :thread => Thread.current.object_id}.merge(data)
|
116
|
-
|
117
|
-
if (l = logger) && output = log_formatter.call(data)
|
118
|
-
l.send level, output
|
119
|
-
end
|
102
|
+
# Integrate Que with any connection pool by passing it a reentrant block
|
103
|
+
# that locks and yields a Postgres connection.
|
104
|
+
def connection_proc=(connection_proc)
|
105
|
+
@pool = connection_proc && ConnectionPool.new(&connection_proc)
|
120
106
|
end
|
121
107
|
|
122
|
-
|
123
|
-
|
108
|
+
# How to actually access Que's established connection pool.
|
109
|
+
def pool
|
110
|
+
@pool || raise(Error, "Que connection not established!")
|
124
111
|
end
|
125
112
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
def disable_prepared_statements
|
131
|
-
@disable_prepared_statements || false
|
132
|
-
end
|
133
|
-
|
134
|
-
def constantize(camel_cased_word)
|
135
|
-
if camel_cased_word.respond_to?(:constantize)
|
136
|
-
# Use ActiveSupport's version if it exists.
|
137
|
-
camel_cased_word.constantize
|
138
|
-
else
|
139
|
-
camel_cased_word.split('::').inject(Object, &:const_get)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
# A helper method to manage transactions, used mainly by the migration
|
144
|
-
# system. It's available for general use, but if you're using an ORM that
|
145
|
-
# provides its own transaction helper, be sure to use that instead, or the
|
146
|
-
# two may interfere with one another.
|
147
|
-
def transaction
|
148
|
-
adapter.checkout do
|
149
|
-
if adapter.in_transaction?
|
150
|
-
yield
|
151
|
-
else
|
152
|
-
begin
|
153
|
-
execute "BEGIN"
|
154
|
-
yield
|
155
|
-
rescue => error
|
156
|
-
raise
|
157
|
-
ensure
|
158
|
-
# Handle a raised error or a killed thread.
|
159
|
-
if error || Thread.current.status == 'aborting'
|
160
|
-
execute "ROLLBACK"
|
161
|
-
else
|
162
|
-
execute "COMMIT"
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
def json_converter
|
170
|
-
@json_converter ||= INDIFFERENTIATOR
|
171
|
-
end
|
172
|
-
|
173
|
-
# Copy some of the Worker class' config methods here for convenience.
|
174
|
-
[:mode, :mode=, :worker_count, :worker_count=, :wake_interval, :wake_interval=, :queue_name, :queue_name=, :wake!, :wake_all!].each do |meth|
|
175
|
-
define_method(meth) { |*args| Worker.send(meth, *args) }
|
176
|
-
end
|
113
|
+
# Set the current pool. Helpful for specs, but probably shouldn't be used
|
114
|
+
# generally.
|
115
|
+
attr_writer :pool
|
177
116
|
end
|
117
|
+
|
118
|
+
# Set config defaults.
|
119
|
+
self.use_prepared_statements = true
|
178
120
|
end
|
179
121
|
|
180
|
-
|
122
|
+
# Load Rails features as appropriate.
|
123
|
+
require_relative 'que/rails/railtie' if defined?(::Rails::Railtie)
|
124
|
+
require_relative 'que/active_job/extensions' if defined?(::ActiveJob)
|
data/que.gemspec
CHANGED
@@ -5,18 +5,31 @@ require 'que/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'que'
|
8
|
-
spec.version = Que::
|
8
|
+
spec.version = Que::VERSION
|
9
9
|
spec.authors = ["Chris Hanks"]
|
10
10
|
spec.email = ['christopher.m.hanks@gmail.com']
|
11
11
|
spec.description = %q{A job queue that uses PostgreSQL's advisory locks for speed and reliability.}
|
12
12
|
spec.summary = %q{A PostgreSQL-based Job Queue}
|
13
|
-
spec.homepage = 'https://github.com/
|
13
|
+
spec.homepage = 'https://github.com/que-rb/que'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
|
-
spec.
|
16
|
+
spec.required_ruby_version = '>= 2.7.0'
|
17
|
+
|
18
|
+
files_to_exclude = [
|
19
|
+
/\A\.circleci/,
|
20
|
+
/\AGemfile/,
|
21
|
+
/\Aspec/,
|
22
|
+
/\Atasks/,
|
23
|
+
/spec\.rb\z/,
|
24
|
+
]
|
25
|
+
|
26
|
+
spec.files = `git ls-files`.split($/).reject do |file|
|
27
|
+
files_to_exclude.any? { |r| r === file }
|
28
|
+
end
|
29
|
+
|
17
30
|
spec.executables = ['que']
|
18
31
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
32
|
spec.require_paths = ['lib']
|
20
33
|
|
21
|
-
spec.add_development_dependency 'bundler'
|
34
|
+
spec.add_development_dependency 'bundler'
|
22
35
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -Eeuo pipefail
|
4
|
+
|
5
|
+
# For using your own dotfiles within the Docker container
|
6
|
+
if [ -f /.docker-rc.d/.docker-bashrc ]; then
|
7
|
+
echo "source /.docker-rc.d/.docker-bashrc" >> ~/.bashrc
|
8
|
+
fi
|
9
|
+
|
10
|
+
gem list -i -e bundler -v "$RUBY_BUNDLER_VERSION" >/dev/null || gem install bundler -v "$RUBY_BUNDLER_VERSION"
|
11
|
+
|
12
|
+
bundle check --dry-run || bundle install
|
13
|
+
|
14
|
+
exec "${@-bash}"
|
data/scripts/test
ADDED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hanks
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '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: '
|
26
|
+
version: '0'
|
27
27
|
description: A job queue that uses PostgreSQL's advisory locks for speed and reliability.
|
28
28
|
email:
|
29
29
|
- christopher.m.hanks@gmail.com
|
@@ -32,37 +32,35 @@ executables:
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- ".github/workflows/tests.yml"
|
35
36
|
- ".gitignore"
|
36
|
-
- ".
|
37
|
-
- ".travis.yml"
|
37
|
+
- ".ruby-version"
|
38
38
|
- CHANGELOG.md
|
39
|
-
-
|
39
|
+
- Dockerfile
|
40
40
|
- LICENSE.txt
|
41
41
|
- README.md
|
42
42
|
- Rakefile
|
43
|
+
- auto/dev
|
44
|
+
- auto/pre-push-hook
|
45
|
+
- auto/psql
|
46
|
+
- auto/test
|
47
|
+
- auto/test-postgres-14
|
43
48
|
- bin/que
|
44
|
-
-
|
45
|
-
- docs/
|
46
|
-
- docs/error_handling.md
|
47
|
-
- docs/inspecting_the_queue.md
|
48
|
-
- docs/logging.md
|
49
|
-
- docs/managing_workers.md
|
50
|
-
- docs/migrating.md
|
51
|
-
- docs/multiple_queues.md
|
52
|
-
- docs/shutting_down_safely.md
|
53
|
-
- docs/using_plain_connections.md
|
54
|
-
- docs/using_sequel.md
|
55
|
-
- docs/writing_reliable_jobs.md
|
56
|
-
- lib/generators/que/install_generator.rb
|
57
|
-
- lib/generators/que/templates/add_que.rb
|
49
|
+
- docker-compose.yml
|
50
|
+
- docs/README.md
|
58
51
|
- lib/que.rb
|
59
|
-
- lib/que/
|
60
|
-
- lib/que/
|
61
|
-
- lib/que/
|
62
|
-
- lib/que/
|
63
|
-
- lib/que/
|
64
|
-
- lib/que/
|
52
|
+
- lib/que/active_job/extensions.rb
|
53
|
+
- lib/que/active_record/connection.rb
|
54
|
+
- lib/que/active_record/model.rb
|
55
|
+
- lib/que/command_line_interface.rb
|
56
|
+
- lib/que/connection.rb
|
57
|
+
- lib/que/connection_pool.rb
|
65
58
|
- lib/que/job.rb
|
59
|
+
- lib/que/job_buffer.rb
|
60
|
+
- lib/que/job_methods.rb
|
61
|
+
- lib/que/listener.rb
|
62
|
+
- lib/que/locker.rb
|
63
|
+
- lib/que/metajob.rb
|
66
64
|
- lib/que/migrations.rb
|
67
65
|
- lib/que/migrations/1/down.sql
|
68
66
|
- lib/que/migrations/1/up.sql
|
@@ -70,46 +68,39 @@ files:
|
|
70
68
|
- lib/que/migrations/2/up.sql
|
71
69
|
- lib/que/migrations/3/down.sql
|
72
70
|
- lib/que/migrations/3/up.sql
|
73
|
-
- lib/que/
|
74
|
-
- lib/que/
|
75
|
-
- lib/que/sql
|
71
|
+
- lib/que/migrations/4/down.sql
|
72
|
+
- lib/que/migrations/4/up.sql
|
73
|
+
- lib/que/migrations/5/down.sql
|
74
|
+
- lib/que/migrations/5/up.sql
|
75
|
+
- lib/que/migrations/6/down.sql
|
76
|
+
- lib/que/migrations/6/up.sql
|
77
|
+
- lib/que/migrations/7/down.sql
|
78
|
+
- lib/que/migrations/7/up.sql
|
79
|
+
- lib/que/poller.rb
|
80
|
+
- lib/que/rails/railtie.rb
|
81
|
+
- lib/que/result_queue.rb
|
82
|
+
- lib/que/sequel/model.rb
|
83
|
+
- lib/que/utils/assertions.rb
|
84
|
+
- lib/que/utils/constantization.rb
|
85
|
+
- lib/que/utils/error_notification.rb
|
86
|
+
- lib/que/utils/freeze.rb
|
87
|
+
- lib/que/utils/introspection.rb
|
88
|
+
- lib/que/utils/json_serialization.rb
|
89
|
+
- lib/que/utils/logging.rb
|
90
|
+
- lib/que/utils/middleware.rb
|
91
|
+
- lib/que/utils/queue_management.rb
|
92
|
+
- lib/que/utils/ruby2_keywords.rb
|
93
|
+
- lib/que/utils/transactions.rb
|
76
94
|
- lib/que/version.rb
|
77
95
|
- lib/que/worker.rb
|
78
96
|
- que.gemspec
|
79
|
-
-
|
80
|
-
-
|
81
|
-
|
82
|
-
- spec/adapters/pond_spec.rb
|
83
|
-
- spec/adapters/sequel_spec.rb
|
84
|
-
- spec/gemfiles/Gemfile1
|
85
|
-
- spec/gemfiles/Gemfile2
|
86
|
-
- spec/spec_helper.rb
|
87
|
-
- spec/support/helpers.rb
|
88
|
-
- spec/support/jobs.rb
|
89
|
-
- spec/support/shared_examples/adapter.rb
|
90
|
-
- spec/support/shared_examples/multi_threaded_adapter.rb
|
91
|
-
- spec/travis.rb
|
92
|
-
- spec/unit/connection_spec.rb
|
93
|
-
- spec/unit/customization_spec.rb
|
94
|
-
- spec/unit/enqueue_spec.rb
|
95
|
-
- spec/unit/helper_spec.rb
|
96
|
-
- spec/unit/logging_spec.rb
|
97
|
-
- spec/unit/migrations_spec.rb
|
98
|
-
- spec/unit/pool_spec.rb
|
99
|
-
- spec/unit/run_spec.rb
|
100
|
-
- spec/unit/states_spec.rb
|
101
|
-
- spec/unit/stats_spec.rb
|
102
|
-
- spec/unit/transaction_spec.rb
|
103
|
-
- spec/unit/work_spec.rb
|
104
|
-
- spec/unit/worker_spec.rb
|
105
|
-
- tasks/benchmark.rb
|
106
|
-
- tasks/rspec.rb
|
107
|
-
- tasks/safe_shutdown.rb
|
108
|
-
homepage: https://github.com/chanks/que
|
97
|
+
- scripts/docker-entrypoint
|
98
|
+
- scripts/test
|
99
|
+
homepage: https://github.com/que-rb/que
|
109
100
|
licenses:
|
110
101
|
- MIT
|
111
102
|
metadata: {}
|
112
|
-
post_install_message:
|
103
|
+
post_install_message:
|
113
104
|
rdoc_options: []
|
114
105
|
require_paths:
|
115
106
|
- lib
|
@@ -117,42 +108,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
108
|
requirements:
|
118
109
|
- - ">="
|
119
110
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
111
|
+
version: 2.7.0
|
121
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
113
|
requirements:
|
123
114
|
- - ">="
|
124
115
|
- !ruby/object:Gem::Version
|
125
116
|
version: '0'
|
126
117
|
requirements: []
|
127
|
-
|
128
|
-
|
129
|
-
signing_key:
|
118
|
+
rubygems_version: 3.3.7
|
119
|
+
signing_key:
|
130
120
|
specification_version: 4
|
131
121
|
summary: A PostgreSQL-based Job Queue
|
132
|
-
test_files:
|
133
|
-
- spec/adapters/active_record_spec.rb
|
134
|
-
- spec/adapters/connection_pool_spec.rb
|
135
|
-
- spec/adapters/pg_spec.rb
|
136
|
-
- spec/adapters/pond_spec.rb
|
137
|
-
- spec/adapters/sequel_spec.rb
|
138
|
-
- spec/gemfiles/Gemfile1
|
139
|
-
- spec/gemfiles/Gemfile2
|
140
|
-
- spec/spec_helper.rb
|
141
|
-
- spec/support/helpers.rb
|
142
|
-
- spec/support/jobs.rb
|
143
|
-
- spec/support/shared_examples/adapter.rb
|
144
|
-
- spec/support/shared_examples/multi_threaded_adapter.rb
|
145
|
-
- spec/travis.rb
|
146
|
-
- spec/unit/connection_spec.rb
|
147
|
-
- spec/unit/customization_spec.rb
|
148
|
-
- spec/unit/enqueue_spec.rb
|
149
|
-
- spec/unit/helper_spec.rb
|
150
|
-
- spec/unit/logging_spec.rb
|
151
|
-
- spec/unit/migrations_spec.rb
|
152
|
-
- spec/unit/pool_spec.rb
|
153
|
-
- spec/unit/run_spec.rb
|
154
|
-
- spec/unit/states_spec.rb
|
155
|
-
- spec/unit/stats_spec.rb
|
156
|
-
- spec/unit/transaction_spec.rb
|
157
|
-
- spec/unit/work_spec.rb
|
158
|
-
- spec/unit/worker_spec.rb
|
122
|
+
test_files: []
|
data/.rspec
DELETED
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- "1.9.3"
|
4
|
-
- "2.0"
|
5
|
-
- "2.1"
|
6
|
-
- "2.2"
|
7
|
-
- "2.3"
|
8
|
-
- "rbx-2"
|
9
|
-
- "jruby-1.7.5"
|
10
|
-
before_script:
|
11
|
-
- psql -c 'create database "que-test"' -U postgres
|
12
|
-
- bundle exec ruby -r sequel -r ./lib/que -e 'Que.connection=Sequel.connect("postgres://localhost/que-test"); Que.migrate!'
|
13
|
-
|
14
|
-
script: "./spec/travis.rb"
|
15
|
-
|
16
|
-
addons:
|
17
|
-
postgresql: 9.3
|
data/Gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
group :development, :test do
|
4
|
-
gem 'rake'
|
5
|
-
|
6
|
-
gem 'activerecord', :require => nil
|
7
|
-
gem 'sequel', :require => nil
|
8
|
-
gem 'connection_pool', :require => nil
|
9
|
-
gem 'pond', :require => nil
|
10
|
-
gem 'pg', :require => nil, :platform => :ruby
|
11
|
-
gem 'pg_jruby', :require => nil, :platform => :jruby
|
12
|
-
end
|
13
|
-
|
14
|
-
group :test do
|
15
|
-
gem 'rspec', '~> 2.14.1'
|
16
|
-
gem 'pry'
|
17
|
-
end
|
18
|
-
|
19
|
-
platforms :rbx do
|
20
|
-
gem 'rubysl', '~> 2.0'
|
21
|
-
gem 'json', '~> 1.8'
|
22
|
-
end
|
23
|
-
|
24
|
-
gemspec
|