switchman-inst-jobs 4.0.12 → 4.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman_inst_jobs/jobs_migrator.rb +8 -4
- data/lib/switchman_inst_jobs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8663d7c19e1900c68ab1595b7306cc2105233b1aa02bb687beee88cdbfa9ada5
|
4
|
+
data.tar.gz: 63f99e858a89ff31c8cda4a1dd35e072e58cda21ebf9d1cdb6a7434ad37f5968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0322296a92637bb28cc00cfe41446fc39eb189fb4c5e433fb1adf115f1ab80204d91228c96a5902d5f2ece3906805e478ecf166dee37ef9d17b7ce9d4c28c1bd'
|
7
|
+
data.tar.gz: 769694ebfd1343c2449b18b14b8883aaab0cf3819e01446878328461542657d31df576501db5539f572cf5bae8ca5c460354e960e4c27f3b3996a6c3439894c4
|
@@ -285,8 +285,7 @@ module SwitchmanInstJobs
|
|
285
285
|
::Delayed::Job.
|
286
286
|
where.not(strand: nil).
|
287
287
|
group(:strand).
|
288
|
-
having('NOT BOOL_OR(next_in_strand)')
|
289
|
-
pluck(:strand)
|
288
|
+
having('NOT BOOL_OR(next_in_strand)')
|
290
289
|
end
|
291
290
|
|
292
291
|
def unblock_strand!(strand, new_parallelism: nil)
|
@@ -315,8 +314,7 @@ module SwitchmanInstJobs
|
|
315
314
|
where(strand: nil).
|
316
315
|
where.not(singleton: nil).
|
317
316
|
group(:singleton).
|
318
|
-
having('NOT BOOL_OR(next_in_strand)')
|
319
|
-
pluck(:singleton)
|
317
|
+
having('NOT BOOL_OR(next_in_strand)')
|
320
318
|
end
|
321
319
|
|
322
320
|
def unblock_singleton!(singleton)
|
@@ -338,6 +336,12 @@ module SwitchmanInstJobs
|
|
338
336
|
end
|
339
337
|
end
|
340
338
|
|
339
|
+
def blocked_job_count
|
340
|
+
::Delayed::Job.from(blocked_strands.select('count(id) AS ssize')).sum('ssize').to_i +
|
341
|
+
::Delayed::Job.from(blocked_singletons.select('count(id) AS ssize')).sum('ssize').to_i +
|
342
|
+
::Delayed::Job.where(strand: nil, singleton: nil, next_in_strand: false).count
|
343
|
+
end
|
344
|
+
|
341
345
|
private
|
342
346
|
|
343
347
|
def create_blocker_job(**kwargs)
|
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.0.
|
4
|
+
version: 4.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|