zuora_connect 1.7.37 → 1.7.38
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a3b72ddd611aeb3b3df95fb6bac3345d38139a1
|
4
|
+
data.tar.gz: ed96958f0447ad7eafe2a3a471a517e8850fd47d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4169982ec3d59a23526353c1f35c8b90ebea975b794bd66beea4e4aff7b6e9ca2426ccbeb679154443b49c53d77eb68991239acb2486fde33f61520af7b3aaaa
|
7
|
+
data.tar.gz: c85a12bd0507ec62a53b753547468a1514b4e6f23a8941bdce925c3d30e10d21b68844eca96ff28694ce39dd59266bcf41d48139072f345e9e7a9a7ca5a1c345
|
@@ -23,7 +23,7 @@ module ZuoraConnect
|
|
23
23
|
if INSTANCE_REFRESH_WINDOW > INSTANCE_REDIS_CACHE_PERIOD
|
24
24
|
raise "The instance refresh window cannot be greater than the instance cache period"
|
25
25
|
end
|
26
|
-
self.apartment_switch(nil,
|
26
|
+
self.apartment_switch(nil, false)
|
27
27
|
end
|
28
28
|
|
29
29
|
def apartment_switch(method = nil, migrate = false)
|
@@ -74,7 +74,7 @@ BEGIN
|
|
74
74
|
format('DROP INDEX IF EXISTS "public"."%s"', concat(aggregate_table_name, '_', index_id));
|
75
75
|
|
76
76
|
EXECUTE
|
77
|
-
format(replace(replace(index_string, index_name, concat(aggregate_table_name, '_', index_id)), concat(' ', table_name, ' '), concat( ' ', aggregate_table_name, ' ')));
|
77
|
+
format(replace(replace(replace(index_string, index_name, concat(aggregate_table_name, '_', index_id)), concat(' ', table_name, ' '), concat( ' ', aggregate_table_name, ' ')), concat('public.', table_name), concat( 'public.', aggregate_table_name)));
|
78
78
|
|
79
79
|
RAISE NOTICE 'Creating Indexes %', replace(replace(replace(index_string, index_name, concat(aggregate_table_name, '_', index_id)), concat(' ', table_name, ' '), concat( ' ', aggregate_table_name, ' ')), concat('public.', table_name), concat( 'public.', aggregate_table_name)) ;
|
80
80
|
END;
|
@@ -23,16 +23,16 @@ module Resque
|
|
23
23
|
busy_queues.select {|q| q == queuename }.size
|
24
24
|
end
|
25
25
|
|
26
|
-
def get_categorized_queues(
|
26
|
+
def get_categorized_queues(queue_list)
|
27
27
|
priority_map = {"Synchronous" => 0, "High" => 1, "Medium" => 2, "Low" => 3}
|
28
28
|
categorized_queues = {}
|
29
|
-
for queue in
|
29
|
+
for queue in queue_list.uniq
|
30
30
|
priority = queue.split("_")[1]
|
31
31
|
priority = "Medium" if !["Synchronous", "High", "Medium", "Low"].include?(priority)
|
32
32
|
categorized_queues[priority] ||= []
|
33
33
|
categorized_queues[priority].push(queue)
|
34
34
|
end
|
35
|
-
return categorized_queues.transform_keys{ |key| priority_map[key.to_s]}
|
35
|
+
return categorized_queues.transform_keys{ |key| priority_map[key.to_s]}.sort
|
36
36
|
end
|
37
37
|
|
38
38
|
DEFAULT_QUEUE_DEPTH = 0
|
@@ -50,11 +50,11 @@ module Resque
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def get_grouped_queues
|
53
|
-
queues.sort.group_by{|u| /(\d{1,20})_.*/.match(u) ? /(\d{1,20})_.*/.match(u).captures.first : nil}
|
53
|
+
self.queues.sort.group_by{|u| /(\d{1,20})_.*/.match(u) ? /(\d{1,20})_.*/.match(u).captures.first : nil}
|
54
54
|
end
|
55
55
|
|
56
56
|
def reserve_with_round_robin
|
57
|
-
grouped_queues = get_grouped_queues
|
57
|
+
grouped_queues = self.get_grouped_queues
|
58
58
|
|
59
59
|
#Instance queue grouping
|
60
60
|
if !grouped_queues.keys.include?(nil) && grouped_queues.keys.size > 0
|
@@ -62,9 +62,8 @@ module Resque
|
|
62
62
|
@n += 1
|
63
63
|
@n = @n % grouped_queues.keys.size
|
64
64
|
grouped_queues.keys.rotate(@n).each do |key|
|
65
|
-
|
66
|
-
|
67
|
-
categorized_queues[key].each do |queue|
|
65
|
+
self.get_categorized_queues(grouped_queues[key]).each do |key, queues|
|
66
|
+
queues.each do |queue|
|
68
67
|
log! "Checking #{queue}"
|
69
68
|
if should_work_on_queue?(queue) && @job_in_progress = Resque::Job.reserve(queue)
|
70
69
|
log! "Found job on #{queue}"
|
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.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|