zuora_connect 1.7.54 → 1.7.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/resque/dynamic_queues.rb +24 -22
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8cd456de5a165de07a5881d2f9193a07ef90556
|
4
|
+
data.tar.gz: e16915afc0bb6e2d56f20ee305ffa5746b894356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 142408e633010bf5379a3e0aceebb627c7e643dc861600708e0362f23e1cd2f8d3803d97145e063b9a163d8a9f25d4342304e89a6e8bca0a0e045bf6815f913d
|
7
|
+
data.tar.gz: 26e613fa91eca022a0002bb9e6922411158bf31680be9397e4225632be85436a654ba8ec76552bc05d8dec7ad748a4bae9c83da67d639a954b6d6b116ed227b4
|
@@ -59,7 +59,10 @@ module Resque
|
|
59
59
|
#Instance queue grouping
|
60
60
|
if !grouped_queues.keys.include?(nil) && grouped_queues.keys.size > 0
|
61
61
|
if ZuoraConnect.configuration.blpop_queue
|
62
|
-
|
62
|
+
@job_in_progress = get_queued_job(grouped_queues)
|
63
|
+
return @job_in_progress if @job_in_progress.present?
|
64
|
+
|
65
|
+
return @job_in_progress = get_restricted_job
|
63
66
|
else
|
64
67
|
@n ||= 0
|
65
68
|
@n += 1
|
@@ -93,11 +96,6 @@ module Resque
|
|
93
96
|
Resque::Job.new(queue, payload)
|
94
97
|
end
|
95
98
|
|
96
|
-
def get_job(grouped_queues)
|
97
|
-
get_restricted_job
|
98
|
-
get_queued_job(grouped_queues)
|
99
|
-
end
|
100
|
-
|
101
99
|
def get_next_job(grouped_queues)
|
102
100
|
@n ||= 1
|
103
101
|
queue_index = {}
|
@@ -119,27 +117,31 @@ module Resque
|
|
119
117
|
end
|
120
118
|
|
121
119
|
def get_queued_job(grouped_queues)
|
122
|
-
|
123
|
-
|
124
|
-
|
120
|
+
if defined?(Resque::Plugins::ConcurrentRestriction)
|
121
|
+
# Bounded retry
|
122
|
+
1.upto(Resque::Plugins::ConcurrentRestriction.reserve_queued_job_attempts) do |i|
|
123
|
+
resque_job = get_next_job(grouped_queues)
|
125
124
|
|
126
|
-
|
127
|
-
|
125
|
+
# Short-curcuit if a job was not found
|
126
|
+
return if resque_job.nil?
|
128
127
|
|
129
|
-
|
130
|
-
|
131
|
-
|
128
|
+
# If there is a job on regular queues, then only run it if its not restricted
|
129
|
+
job_class = resque_job.payload_class
|
130
|
+
job_args = resque_job.args
|
132
131
|
|
133
|
-
|
134
|
-
|
132
|
+
# Return to work on job if not a restricted job
|
133
|
+
return resque_job unless job_class.is_a?(Resque::Plugins::ConcurrentRestriction)
|
135
134
|
|
136
|
-
|
137
|
-
|
138
|
-
|
135
|
+
# Keep trying if job is restricted. If job is runnable, we keep the lock until
|
136
|
+
# done_working
|
137
|
+
return resque_job unless job_class.stash_if_restricted(resque_job)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Safety net, here in case we hit the upper bound and there are still queued items
|
141
|
+
return nil
|
142
|
+
else
|
143
|
+
return get_next_job(grouped_queues)
|
139
144
|
end
|
140
|
-
|
141
|
-
# Safety net, here in case we hit the upper bound and there are still queued items
|
142
|
-
return nil
|
143
145
|
end
|
144
146
|
|
145
147
|
# Returns a list of queues to use when searching for a job.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|