switchman-inst-jobs 3.2.2 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20101216224513_create_delayed_jobs.rb +1 -1
- data/db/migrate/20110208031356_add_delayed_jobs_tag.rb +1 -1
- data/db/migrate/20110426161613_add_delayed_jobs_max_attempts.rb +1 -1
- data/db/migrate/20110516225834_add_delayed_jobs_strand.rb +1 -1
- data/db/migrate/20110531144916_cleanup_delayed_jobs_indexes.rb +1 -1
- data/db/migrate/20110610213249_optimize_delayed_jobs.rb +1 -1
- data/db/migrate/20110831210257_add_delayed_jobs_next_in_strand.rb +1 -1
- data/db/migrate/20120510004759_delayed_jobs_delete_trigger_lock_for_update.rb +1 -1
- data/db/migrate/20120531150712_drop_psql_jobs_pop_fn.rb +1 -1
- data/db/migrate/20120607164022_delayed_jobs_use_advisory_locks.rb +1 -1
- data/db/migrate/20120607181141_index_jobs_on_locked_by.rb +2 -2
- data/db/migrate/20120608191051_add_jobs_run_at_index.rb +2 -2
- data/db/migrate/20120927184213_change_delayed_jobs_handler_to_text.rb +1 -1
- data/db/migrate/20140505215131_add_failed_jobs_original_job_id.rb +1 -1
- data/db/migrate/20140505215510_copy_failed_jobs_original_id.rb +2 -2
- data/db/migrate/20140505223637_drop_failed_jobs_original_id.rb +1 -1
- data/db/migrate/20140512213941_add_source_to_jobs.rb +1 -1
- data/db/migrate/20150807133223_add_max_concurrent_to_jobs.rb +1 -1
- data/db/migrate/20151123210429_add_expires_at_to_jobs.rb +1 -1
- data/db/migrate/20151210162949_improve_max_concurrent.rb +1 -1
- data/db/migrate/20161206323555_add_back_default_string_limits_jobs.rb +1 -1
- data/db/migrate/20170308045400_add_shard_id_to_delayed_jobs.rb +1 -11
- data/db/migrate/20170308045401_add_delayed_jobs_shard_id_to_switchman_shards.rb +5 -0
- data/db/migrate/20181217155351_speed_up_max_concurrent_triggers.rb +1 -1
- data/db/migrate/20190726154743_make_critical_columns_not_null.rb +1 -1
- data/db/migrate/20200330230722_add_id_to_get_delayed_jobs_index.rb +2 -2
- data/db/migrate/20200824222232_speed_up_max_concurrent_delete_trigger.rb +1 -1
- data/db/migrate/20200825011002_add_strand_order_override.rb +2 -2
- data/db/migrate/20210929204903_update_conflicting_singleton_function_to_use_index.rb +27 -0
- data/db/migrate/20211101190934_update_after_delete_trigger_for_singleton_index.rb +137 -0
- data/db/migrate/20211207094200_update_after_delete_trigger_for_singleton_transition_cases.rb +171 -0
- data/lib/switchman_inst_jobs/active_record/connection_adapters/connection_pool.rb +15 -0
- data/lib/switchman_inst_jobs/delayed/backend/base.rb +9 -8
- data/lib/switchman_inst_jobs/delayed/pool.rb +1 -1
- data/lib/switchman_inst_jobs/delayed/worker/health_check.rb +10 -12
- data/lib/switchman_inst_jobs/delayed/worker.rb +2 -2
- data/lib/switchman_inst_jobs/engine.rb +6 -4
- data/lib/switchman_inst_jobs/jobs_migrator.rb +32 -22
- data/lib/switchman_inst_jobs/switchman/shard.rb +8 -21
- data/lib/switchman_inst_jobs/version.rb +1 -1
- data/lib/switchman_inst_jobs.rb +4 -0
- metadata +71 -30
@@ -24,19 +24,18 @@ module SwitchmanInstJobs
|
|
24
24
|
# In general this will only happen in unusual circumstances like tests
|
25
25
|
# also if migrations are running, always use the current shard's job shard
|
26
26
|
if ::ActiveRecord::Migration.open_migrations.zero? &&
|
27
|
-
current_shard.delayed_jobs_shard !=
|
27
|
+
current_shard.delayed_jobs_shard !=
|
28
|
+
::Switchman::Shard.current(::Delayed::Backend::ActiveRecord::AbstractJob)
|
28
29
|
enqueue_job.call
|
29
30
|
else
|
30
|
-
::Switchman::Shard.
|
31
|
-
current_shard = ::Switchman::Shard.lookup(current_shard.id)
|
32
|
-
end
|
31
|
+
current_shard = ::Switchman::Shard.lookup(current_shard.id)
|
33
32
|
current_job_shard = current_shard.delayed_jobs_shard
|
34
33
|
|
35
34
|
if (options[:singleton] || options[:strand]) && current_shard.block_stranded
|
36
35
|
enqueue_options[:next_in_strand] = false
|
37
36
|
end
|
38
37
|
|
39
|
-
current_job_shard.activate(
|
38
|
+
current_job_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
40
39
|
enqueue_job.call
|
41
40
|
end
|
42
41
|
end
|
@@ -50,7 +49,7 @@ module SwitchmanInstJobs
|
|
50
49
|
shard_ids = configured_shard_ids
|
51
50
|
if shard_ids.any?
|
52
51
|
shards = shard_ids.map { |shard_id| ::Delayed::Worker.shard(shard_id) }
|
53
|
-
::Switchman::Shard.with_each_shard(shards, [
|
52
|
+
::Switchman::Shard.with_each_shard(shards, [::Delayed::Backend::ActiveRecord::AbstractJob]) do
|
54
53
|
super
|
55
54
|
end
|
56
55
|
else
|
@@ -61,7 +60,9 @@ module SwitchmanInstJobs
|
|
61
60
|
|
62
61
|
def self.prepended(base)
|
63
62
|
base.singleton_class.prepend(ClassMethods)
|
64
|
-
|
63
|
+
return unless base.name == 'Delayed::Backend::ActiveRecord::Job'
|
64
|
+
|
65
|
+
::Delayed::Backend::ActiveRecord::AbstractJob.sharded_model
|
65
66
|
end
|
66
67
|
|
67
68
|
def current_shard
|
@@ -90,7 +91,7 @@ module SwitchmanInstJobs
|
|
90
91
|
raise ShardNotFoundError, shard_id unless current_shard
|
91
92
|
|
92
93
|
current_shard.activate { super }
|
93
|
-
rescue
|
94
|
+
rescue PG::ConnectionBad, PG::UndefinedTable
|
94
95
|
# likely a missing shard with a stale cache
|
95
96
|
current_shard.send(:clear_cache)
|
96
97
|
::Switchman::Shard.clear_cache
|
@@ -20,7 +20,7 @@ module SwitchmanInstJobs
|
|
20
20
|
shard_ids = @config[:workers].pluck(:shard).uniq
|
21
21
|
shards = shard_ids.map { |shard_id| ::Delayed::Worker.shard(shard_id) }
|
22
22
|
end
|
23
|
-
::Switchman::Shard.with_each_shard(shards, [
|
23
|
+
::Switchman::Shard.with_each_shard(shards, [::Delayed::Backend::ActiveRecord::AbstractJob]) do
|
24
24
|
super
|
25
25
|
end
|
26
26
|
end
|
@@ -21,18 +21,16 @@ module SwitchmanInstJobs
|
|
21
21
|
def reschedule_abandoned_jobs
|
22
22
|
shard_ids = ::SwitchmanInstJobs::Delayed::Settings.configured_shard_ids
|
23
23
|
shards = shard_ids.map { |shard_id| ::Delayed::Worker.shard(shard_id) }
|
24
|
-
::Switchman::Shard.with_each_shard(shards,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
super()
|
35
|
-
end
|
24
|
+
::Switchman::Shard.with_each_shard(shards,
|
25
|
+
[::ActiveRecord::Base, ::Delayed::Backend::ActiveRecord::AbstractJob]) do
|
26
|
+
munge_service_name(::Switchman::Shard.current) do
|
27
|
+
# because this rescheduling process is running on every host, we need
|
28
|
+
# to make sure that it's functioning for each shard the current
|
29
|
+
# host is programmed to interact with, but ONLY for those shards.
|
30
|
+
# reading the config lets us iterate over any shards this host should
|
31
|
+
# work with and lets us pick the correct service name to identify which
|
32
|
+
# hosts are currently alive and valid via the health checks
|
33
|
+
super()
|
36
34
|
end
|
37
35
|
end
|
38
36
|
end
|
@@ -16,14 +16,14 @@ module SwitchmanInstJobs
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def start
|
19
|
-
shard.activate(
|
19
|
+
shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) { super }
|
20
20
|
end
|
21
21
|
|
22
22
|
# Worker#run is usually only called from Worker#start, but if the worker
|
23
23
|
# is called directly from the console, we want to make sure it still gets
|
24
24
|
# the right shard activated.
|
25
25
|
def run
|
26
|
-
shard.activate(
|
26
|
+
shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) { super }
|
27
27
|
end
|
28
28
|
|
29
29
|
def shard
|
@@ -11,7 +11,9 @@ module SwitchmanInstJobs
|
|
11
11
|
|
12
12
|
::Delayed::Worker.lifecycle.around(:work_queue_pop) do |worker, config, &block|
|
13
13
|
if config[:shard]
|
14
|
-
::Switchman::Shard.lookup(config[:shard]).activate(
|
14
|
+
::Switchman::Shard.lookup(config[:shard]).activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
15
|
+
block.call(worker, config)
|
16
|
+
end
|
15
17
|
else
|
16
18
|
block.call(worker, config)
|
17
19
|
end
|
@@ -23,8 +25,8 @@ module SwitchmanInstJobs
|
|
23
25
|
::Switchman::Shard.clear_cache
|
24
26
|
::Switchman::Shard.default.activate do
|
25
27
|
current_job_shard = ::Switchman::Shard.lookup(job.shard_id).delayed_jobs_shard
|
26
|
-
if current_job_shard != ::Switchman::Shard.current(
|
27
|
-
current_job_shard.activate(
|
28
|
+
if current_job_shard != ::Switchman::Shard.current(::Delayed::Backend::ActiveRecord::AbstractJob)
|
29
|
+
current_job_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
28
30
|
j = ::Delayed::Job.where(strand: job.strand).next_in_strand_order.first
|
29
31
|
j.update_column(:next_in_strand, true) if j && !j.next_in_strand
|
30
32
|
end
|
@@ -43,7 +45,7 @@ module SwitchmanInstJobs
|
|
43
45
|
end
|
44
46
|
|
45
47
|
config.after_initialize do
|
46
|
-
::Switchman::Shard.default.delayed_jobs_shard.activate!(
|
48
|
+
::Switchman::Shard.default.delayed_jobs_shard.activate!(::Delayed::Backend::ActiveRecord::AbstractJob)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -13,10 +13,10 @@ module SwitchmanInstJobs
|
|
13
13
|
return yield if shards.empty?
|
14
14
|
|
15
15
|
shard = shards.pop
|
16
|
-
current_shard = ::Switchman::Shard.current(
|
17
|
-
shard.activate(
|
16
|
+
current_shard = ::Switchman::Shard.current(::Delayed::Backend::ActiveRecord::AbstractJob)
|
17
|
+
shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
18
18
|
::Delayed::Job.transaction do
|
19
|
-
current_shard.activate(
|
19
|
+
current_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
20
20
|
transaction_on(shards, &block)
|
21
21
|
end
|
22
22
|
end
|
@@ -45,11 +45,11 @@ module SwitchmanInstJobs
|
|
45
45
|
# rubocop:disable Style/CombinableLoops
|
46
46
|
# We first migrate strands so that we can stop blocking strands before we migrate unstranded jobs
|
47
47
|
source_shards.each do |s|
|
48
|
-
::Switchman::Shard.lookup(s).activate(
|
48
|
+
::Switchman::Shard.lookup(s).activate(::Delayed::Backend::ActiveRecord::AbstractJob) { migrate_strands }
|
49
49
|
end
|
50
50
|
|
51
51
|
source_shards.each do |s|
|
52
|
-
::Switchman::Shard.lookup(s).activate(
|
52
|
+
::Switchman::Shard.lookup(s).activate(::Delayed::Backend::ActiveRecord::AbstractJob) { migrate_everything }
|
53
53
|
end
|
54
54
|
ensure_unblock_stranded_for(shard_map.map(&:first))
|
55
55
|
# rubocop:enable Style/CombinableLoops
|
@@ -72,7 +72,7 @@ module SwitchmanInstJobs
|
|
72
72
|
|
73
73
|
def clear_shard_cache(debug_message = nil)
|
74
74
|
::Switchman.cache.clear
|
75
|
-
Rails.logger.debug
|
75
|
+
Rails.logger.debug { "Waiting for caches to clear #{debug_message}" }
|
76
76
|
# Wait a little over the 60 second in-process shard cache clearing
|
77
77
|
# threshold to ensure that all new stranded jobs are now being
|
78
78
|
# enqueued with next_in_strand: false
|
@@ -99,7 +99,7 @@ module SwitchmanInstJobs
|
|
99
99
|
# 4) no running job, jobs moved: set next_in_strand=true on the first of
|
100
100
|
# those (= do nothing since it should already be true)
|
101
101
|
|
102
|
-
source_shard = ::Switchman::Shard.current(
|
102
|
+
source_shard = ::Switchman::Shard.current(::Delayed::Backend::ActiveRecord::AbstractJob)
|
103
103
|
strand_scope = ::Delayed::Job.shard(source_shard).where.not(strand: nil)
|
104
104
|
shard_map = build_shard_map(strand_scope, source_shard)
|
105
105
|
shard_map.each do |(target_shard, source_shard_ids)|
|
@@ -108,7 +108,7 @@ module SwitchmanInstJobs
|
|
108
108
|
# 1) is taken care of because it should not show up here in strands
|
109
109
|
strands = shard_scope.distinct.order(:strand).pluck(:strand)
|
110
110
|
|
111
|
-
target_shard.activate(
|
111
|
+
target_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
112
112
|
strands.each do |strand|
|
113
113
|
transaction_on([source_shard, target_shard]) do
|
114
114
|
this_strand_scope = shard_scope.where(strand: strand)
|
@@ -167,7 +167,7 @@ module SwitchmanInstJobs
|
|
167
167
|
end
|
168
168
|
|
169
169
|
def unblock_strands(target_shard)
|
170
|
-
target_shard.activate(
|
170
|
+
target_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
171
171
|
loop do
|
172
172
|
# We only want to unlock stranded jobs where they don't belong to a blocked shard (if they *do* belong)
|
173
173
|
# to a blocked shard, they must be part of a concurrent jobs migration from a different source shard to
|
@@ -186,8 +186,8 @@ module SwitchmanInstJobs
|
|
186
186
|
end
|
187
187
|
|
188
188
|
def migrate_everything
|
189
|
-
source_shard = ::Switchman::Shard.current(
|
190
|
-
scope = ::Delayed::Job.shard(source_shard).where(
|
189
|
+
source_shard = ::Switchman::Shard.current(::Delayed::Backend::ActiveRecord::AbstractJob)
|
190
|
+
scope = ::Delayed::Job.shard(source_shard).where(strand: nil)
|
191
191
|
|
192
192
|
shard_map = build_shard_map(scope, source_shard)
|
193
193
|
shard_map.each do |(target_shard, source_shard_ids)|
|
@@ -220,16 +220,20 @@ module SwitchmanInstJobs
|
|
220
220
|
# Adapted from get_and_lock_next_available in delayed/backend/active_record.rb
|
221
221
|
target_jobs = scope.limit(1000).lock('FOR UPDATE SKIP LOCKED')
|
222
222
|
|
223
|
-
query = source_shard.activate(
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
223
|
+
query = source_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
224
|
+
<<~SQL
|
225
|
+
WITH limited_jobs AS (#{target_jobs.to_sql})
|
226
|
+
UPDATE #{::Delayed::Job.quoted_table_name}
|
227
|
+
SET locked_by = #{::Delayed::Job.connection.quote(::Delayed::Backend::Base::ON_HOLD_LOCKED_BY)},
|
228
|
+
locked_at = #{::Delayed::Job.connection.quote(::Delayed::Job.db_time_now)}
|
229
|
+
FROM limited_jobs WHERE limited_jobs.id=#{::Delayed::Job.quoted_table_name}.id
|
230
|
+
RETURNING #{::Delayed::Job.quoted_table_name}.*
|
231
|
+
SQL
|
230
232
|
end
|
231
233
|
|
232
|
-
jobs = source_shard.activate(
|
234
|
+
jobs = source_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
235
|
+
::Delayed::Job.find_by_sql(query)
|
236
|
+
end
|
233
237
|
new_jobs = jobs.map do |job|
|
234
238
|
new_job = job.dup
|
235
239
|
new_job.shard = target_shard
|
@@ -247,10 +251,10 @@ module SwitchmanInstJobs
|
|
247
251
|
new_job
|
248
252
|
end
|
249
253
|
transaction_on([source_shard, target_shard]) do
|
250
|
-
target_shard.activate(
|
254
|
+
target_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
251
255
|
bulk_insert_jobs(new_jobs)
|
252
256
|
end
|
253
|
-
source_shard.activate(
|
257
|
+
source_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
254
258
|
::Delayed::Job.delete(jobs)
|
255
259
|
end
|
256
260
|
end
|
@@ -277,7 +281,10 @@ module SwitchmanInstJobs
|
|
277
281
|
connection = ::Delayed::Job.connection
|
278
282
|
quoted_keys = keys.map { |k| connection.quote_column_name(k) }.join(', ')
|
279
283
|
|
280
|
-
connection.execute
|
284
|
+
connection.execute 'DROP TABLE IF EXISTS delayed_jobs_bulk_copy'
|
285
|
+
connection.execute "CREATE TEMPORARY TABLE delayed_jobs_bulk_copy
|
286
|
+
(LIKE #{::Delayed::Job.quoted_table_name} INCLUDING DEFAULTS)"
|
287
|
+
connection.execute "COPY delayed_jobs_bulk_copy (#{quoted_keys}) FROM STDIN"
|
281
288
|
records.map do |record|
|
282
289
|
connection.raw_connection.put_copy_data("#{keys.map { |k| quote_text(record[k]) }.join("\t")}\n")
|
283
290
|
end
|
@@ -289,6 +296,9 @@ module SwitchmanInstJobs
|
|
289
296
|
rescue StandardError => e
|
290
297
|
raise connection.send(:translate_exception, e, 'COPY FROM STDIN')
|
291
298
|
end
|
299
|
+
connection.execute "INSERT INTO #{::Delayed::Job.quoted_table_name} (#{quoted_keys})
|
300
|
+
SELECT #{quoted_keys} FROM delayed_jobs_bulk_copy
|
301
|
+
ON CONFLICT (singleton) WHERE singleton IS NOT NULL AND locked_by IS NULL DO NOTHING"
|
292
302
|
result.cmd_tuples
|
293
303
|
end
|
294
304
|
|
@@ -22,12 +22,12 @@ module SwitchmanInstJobs
|
|
22
22
|
def hold_jobs!(wait: false)
|
23
23
|
self.jobs_held = true
|
24
24
|
save! if changed?
|
25
|
-
delayed_jobs_shard.activate(
|
25
|
+
delayed_jobs_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
26
26
|
lock_jobs_for_hold
|
27
27
|
end
|
28
28
|
return unless wait
|
29
29
|
|
30
|
-
delayed_jobs_shard.activate(
|
30
|
+
delayed_jobs_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
31
31
|
while ::Delayed::Job.where(shard_id: id).
|
32
32
|
where.not(locked_at: nil).
|
33
33
|
where.not(locked_by: ::Delayed::Backend::Base::ON_HOLD_LOCKED_BY).exists?
|
@@ -47,7 +47,7 @@ module SwitchmanInstJobs
|
|
47
47
|
Rails.logger.debug('Waiting for caches to clear')
|
48
48
|
sleep(65)
|
49
49
|
end
|
50
|
-
delayed_jobs_shard.activate(
|
50
|
+
delayed_jobs_shard.activate(::Delayed::Backend::ActiveRecord::AbstractJob) do
|
51
51
|
::Delayed::Job.where(locked_by: ::Delayed::Backend::Base::ON_HOLD_LOCKED_BY, shard_id: id).
|
52
52
|
in_batches(of: 10_000).
|
53
53
|
update_all(
|
@@ -75,22 +75,14 @@ module SwitchmanInstJobs
|
|
75
75
|
remove_instance_variable(:@delayed_jobs_shards) if instance_variable_defined?(:@delayed_jobs_shards)
|
76
76
|
end
|
77
77
|
|
78
|
-
def current(category = :primary)
|
79
|
-
if category == :delayed_jobs
|
80
|
-
active_shards[category] || super(:primary).delayed_jobs_shard
|
81
|
-
else
|
82
|
-
super
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
78
|
def activate!(categories)
|
87
79
|
if !@skip_delayed_job_auto_activation &&
|
88
|
-
!categories[
|
89
|
-
categories[
|
90
|
-
categories[
|
80
|
+
!categories[::Delayed::Backend::ActiveRecord::AbstractJob] &&
|
81
|
+
categories[::ActiveRecord::Base] &&
|
82
|
+
categories[::ActiveRecord::Base] != ::Switchman::Shard.current(::ActiveRecord::Base)
|
91
83
|
skip_delayed_job_auto_activation do
|
92
|
-
categories[
|
93
|
-
categories[
|
84
|
+
categories[::Delayed::Backend::ActiveRecord::AbstractJob] =
|
85
|
+
categories[::ActiveRecord::Base].delayed_jobs_shard
|
94
86
|
end
|
95
87
|
end
|
96
88
|
super
|
@@ -104,11 +96,6 @@ module SwitchmanInstJobs
|
|
104
96
|
@skip_delayed_job_auto_activation = was
|
105
97
|
end
|
106
98
|
|
107
|
-
def create
|
108
|
-
db = ::Switchman::DatabaseServer.server_for_new_shard
|
109
|
-
db.create_new_shard
|
110
|
-
end
|
111
|
-
|
112
99
|
def periodic_clear_shard_cache
|
113
100
|
# TODO: make this configurable
|
114
101
|
@timed_cache ||= TimedCache.new(-> { 60.to_i.seconds.ago }) do
|
data/lib/switchman_inst_jobs.rb
CHANGED
@@ -5,6 +5,9 @@ module SwitchmanInstJobs
|
|
5
5
|
cattr_accessor :delayed_jobs_shard_fallback
|
6
6
|
|
7
7
|
def self.initialize_active_record
|
8
|
+
::ActiveRecord::ConnectionAdapters::ConnectionPool.prepend(
|
9
|
+
ActiveRecord::ConnectionAdapters::ConnectionPool
|
10
|
+
)
|
8
11
|
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(
|
9
12
|
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
|
10
13
|
)
|
@@ -32,6 +35,7 @@ module SwitchmanInstJobs
|
|
32
35
|
end
|
33
36
|
end
|
34
37
|
|
38
|
+
require 'switchman_inst_jobs/active_record/connection_adapters/connection_pool'
|
35
39
|
require 'switchman_inst_jobs/active_record/connection_adapters/postgresql_adapter'
|
36
40
|
require 'switchman_inst_jobs/active_record/migration'
|
37
41
|
require 'switchman_inst_jobs/delayed/settings'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman-inst-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 2.4.9
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 2.4.9
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: parallel
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,34 +50,40 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '6.1'
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '6.
|
56
|
+
version: '6.2'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
63
|
+
version: '6.1'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '6.
|
66
|
+
version: '6.2'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: switchman
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
73
|
+
version: '3.0'
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 3.0.1
|
74
77
|
type: :runtime
|
75
78
|
prerelease: false
|
76
79
|
version_requirements: !ruby/object:Gem::Requirement
|
77
80
|
requirements:
|
78
81
|
- - "~>"
|
79
82
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
83
|
+
version: '3.0'
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 3.0.1
|
81
87
|
- !ruby/object:Gem::Dependency
|
82
88
|
name: bundler
|
83
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,16 +116,16 @@ dependencies:
|
|
110
116
|
name: diplomat
|
111
117
|
requirement: !ruby/object:Gem::Requirement
|
112
118
|
requirements:
|
113
|
-
- - "
|
119
|
+
- - "~>"
|
114
120
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
121
|
+
version: 2.5.1
|
116
122
|
type: :development
|
117
123
|
prerelease: false
|
118
124
|
version_requirements: !ruby/object:Gem::Requirement
|
119
125
|
requirements:
|
120
|
-
- - "
|
126
|
+
- - "~>"
|
121
127
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
128
|
+
version: 2.5.1
|
123
129
|
- !ruby/object:Gem::Dependency
|
124
130
|
name: newrelic_rpm
|
125
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,70 +188,98 @@ dependencies:
|
|
182
188
|
requirements:
|
183
189
|
- - "~>"
|
184
190
|
- !ruby/object:Gem::Version
|
185
|
-
version: '3.
|
191
|
+
version: '3.10'
|
186
192
|
type: :development
|
187
193
|
prerelease: false
|
188
194
|
version_requirements: !ruby/object:Gem::Requirement
|
189
195
|
requirements:
|
190
196
|
- - "~>"
|
191
197
|
- !ruby/object:Gem::Version
|
192
|
-
version: '3.
|
198
|
+
version: '3.10'
|
193
199
|
- !ruby/object:Gem::Dependency
|
194
200
|
name: rspec-rails
|
195
201
|
requirement: !ruby/object:Gem::Requirement
|
196
202
|
requirements:
|
197
203
|
- - "~>"
|
198
204
|
- !ruby/object:Gem::Version
|
199
|
-
version: '
|
205
|
+
version: '5.0'
|
200
206
|
type: :development
|
201
207
|
prerelease: false
|
202
208
|
version_requirements: !ruby/object:Gem::Requirement
|
203
209
|
requirements:
|
204
210
|
- - "~>"
|
205
211
|
- !ruby/object:Gem::Version
|
206
|
-
version: '
|
212
|
+
version: '5.0'
|
207
213
|
- !ruby/object:Gem::Dependency
|
208
214
|
name: rubocop
|
209
215
|
requirement: !ruby/object:Gem::Requirement
|
210
216
|
requirements:
|
211
217
|
- - "~>"
|
212
218
|
- !ruby/object:Gem::Version
|
213
|
-
version: 1.
|
219
|
+
version: '1.15'
|
214
220
|
type: :development
|
215
221
|
prerelease: false
|
216
222
|
version_requirements: !ruby/object:Gem::Requirement
|
217
223
|
requirements:
|
218
224
|
- - "~>"
|
219
225
|
- !ruby/object:Gem::Version
|
220
|
-
version: 1.
|
226
|
+
version: '1.15'
|
221
227
|
- !ruby/object:Gem::Dependency
|
222
228
|
name: rubocop-rails
|
223
229
|
requirement: !ruby/object:Gem::Requirement
|
224
230
|
requirements:
|
225
231
|
- - "~>"
|
226
232
|
- !ruby/object:Gem::Version
|
227
|
-
version: 2.
|
233
|
+
version: '2.10'
|
234
|
+
type: :development
|
235
|
+
prerelease: false
|
236
|
+
version_requirements: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - "~>"
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: '2.10'
|
241
|
+
- !ruby/object:Gem::Dependency
|
242
|
+
name: rubocop-rake
|
243
|
+
requirement: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - "~>"
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0.6'
|
248
|
+
type: :development
|
249
|
+
prerelease: false
|
250
|
+
version_requirements: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - "~>"
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0.6'
|
255
|
+
- !ruby/object:Gem::Dependency
|
256
|
+
name: rubocop-rspec
|
257
|
+
requirement: !ruby/object:Gem::Requirement
|
258
|
+
requirements:
|
259
|
+
- - "~>"
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '2.4'
|
228
262
|
type: :development
|
229
263
|
prerelease: false
|
230
264
|
version_requirements: !ruby/object:Gem::Requirement
|
231
265
|
requirements:
|
232
266
|
- - "~>"
|
233
267
|
- !ruby/object:Gem::Version
|
234
|
-
version: 2.
|
268
|
+
version: '2.4'
|
235
269
|
- !ruby/object:Gem::Dependency
|
236
270
|
name: simplecov
|
237
271
|
requirement: !ruby/object:Gem::Requirement
|
238
272
|
requirements:
|
239
273
|
- - "~>"
|
240
274
|
- !ruby/object:Gem::Version
|
241
|
-
version: '0.
|
275
|
+
version: '0.21'
|
242
276
|
type: :development
|
243
277
|
prerelease: false
|
244
278
|
version_requirements: !ruby/object:Gem::Requirement
|
245
279
|
requirements:
|
246
280
|
- - "~>"
|
247
281
|
- !ruby/object:Gem::Version
|
248
|
-
version: '0.
|
282
|
+
version: '0.21'
|
249
283
|
- !ruby/object:Gem::Dependency
|
250
284
|
name: wwtd
|
251
285
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,7 +294,7 @@ dependencies:
|
|
260
294
|
- - "~>"
|
261
295
|
- !ruby/object:Gem::Version
|
262
296
|
version: '1.4'
|
263
|
-
description:
|
297
|
+
description:
|
264
298
|
email:
|
265
299
|
- bpetty@instructure.com
|
266
300
|
executables: []
|
@@ -289,6 +323,7 @@ files:
|
|
289
323
|
- db/migrate/20151210162949_improve_max_concurrent.rb
|
290
324
|
- db/migrate/20161206323555_add_back_default_string_limits_jobs.rb
|
291
325
|
- db/migrate/20170308045400_add_shard_id_to_delayed_jobs.rb
|
326
|
+
- db/migrate/20170308045401_add_delayed_jobs_shard_id_to_switchman_shards.rb
|
292
327
|
- db/migrate/20181217155351_speed_up_max_concurrent_triggers.rb
|
293
328
|
- db/migrate/20190726154743_make_critical_columns_not_null.rb
|
294
329
|
- db/migrate/20200330230722_add_id_to_get_delayed_jobs_index.rb
|
@@ -300,8 +335,12 @@ files:
|
|
300
335
|
- db/migrate/20210812210128_add_singleton_column.rb
|
301
336
|
- db/migrate/20210917232626_add_delete_conflicting_singletons_before_unlock_trigger.rb
|
302
337
|
- db/migrate/20210928174754_fix_singleton_condition_in_before_insert.rb
|
338
|
+
- db/migrate/20210929204903_update_conflicting_singleton_function_to_use_index.rb
|
339
|
+
- db/migrate/20211101190934_update_after_delete_trigger_for_singleton_index.rb
|
340
|
+
- db/migrate/20211207094200_update_after_delete_trigger_for_singleton_transition_cases.rb
|
303
341
|
- lib/switchman-inst-jobs.rb
|
304
342
|
- lib/switchman_inst_jobs.rb
|
343
|
+
- lib/switchman_inst_jobs/active_record/connection_adapters/connection_pool.rb
|
305
344
|
- lib/switchman_inst_jobs/active_record/connection_adapters/postgresql_adapter.rb
|
306
345
|
- lib/switchman_inst_jobs/active_record/migration.rb
|
307
346
|
- lib/switchman_inst_jobs/delayed/backend/base.rb
|
@@ -323,8 +362,10 @@ files:
|
|
323
362
|
homepage: https://github.com/instructure/switchman-inst-jobs
|
324
363
|
licenses:
|
325
364
|
- MIT
|
326
|
-
metadata:
|
327
|
-
|
365
|
+
metadata:
|
366
|
+
allowed_push_host: https://rubygems.org
|
367
|
+
rubygems_mfa_required: 'true'
|
368
|
+
post_install_message:
|
328
369
|
rdoc_options: []
|
329
370
|
require_paths:
|
330
371
|
- lib
|
@@ -339,8 +380,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
339
380
|
- !ruby/object:Gem::Version
|
340
381
|
version: '0'
|
341
382
|
requirements: []
|
342
|
-
rubygems_version: 3.
|
343
|
-
signing_key:
|
383
|
+
rubygems_version: 3.1.4
|
384
|
+
signing_key:
|
344
385
|
specification_version: 4
|
345
386
|
summary: Switchman and Instructure Jobs compatibility gem.
|
346
387
|
test_files: []
|