zuora_connect 2.0.11 → 2.0.12
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a05037d88871d671bcb1d4093fc2dc729ebd7ffac6e63b3c6479fa40fe98a55
|
4
|
+
data.tar.gz: 20969c6650994e99025f0dec1180471d4b020b34b808eef2f1ad9d73fead1555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e22feed7b07c712bdf1f0970d8f21f40821fbec85512b0122639143c8ae4d91fe9b12df96871aad33b898dc818f776f0853019f1eedcf61f11810f894a0e00
|
7
|
+
data.tar.gz: 6d5c431862e70f7e0176c6a945095d2860833edb171e934e6b0404097331863aadff3e2c822d11a445477a8a99476de5b27374db7c79c7b0b362b1f8a4ffafba
|
@@ -982,12 +982,12 @@ module ZuoraConnect
|
|
982
982
|
### END S3 Helping Methods #####
|
983
983
|
|
984
984
|
### START Aggregate Grouping Helping Methods ####
|
985
|
-
def self.refresh_aggregate_table(aggregate_name: 'all_tasks_processing', table_name: 'tasks', where_clause: "where status in ('Processing', 'Queued')", index_table: true)
|
985
|
+
def self.refresh_aggregate_table(aggregate_name: 'all_tasks_processing', table_name: 'tasks', where_clause: "where status in ('Processing', 'Queued')", index_table: true, ignore_indexes: [])
|
986
986
|
self.update_functions
|
987
987
|
if index_table
|
988
|
-
ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'Index\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause)])
|
988
|
+
ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'Index\', \'{%s}\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause), ignore_indexes.map { |index| "\"#{index}\"" }.join(',')])
|
989
989
|
else
|
990
|
-
ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'NO\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause)])
|
990
|
+
ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'NO\',\'{}\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause)])
|
991
991
|
end
|
992
992
|
end
|
993
993
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
CREATE OR REPLACE FUNCTION "shared_extensions".refresh_aggregate_table(aggregate_table_name text, table_name text, filter text, mode text) RETURNS void AS $$
|
1
|
+
CREATE OR REPLACE FUNCTION "shared_extensions".refresh_aggregate_table(aggregate_table_name text, table_name text, filter text, mode text, ignore_indexes text[]) RETURNS void AS $$
|
2
2
|
DECLARE
|
3
3
|
schema RECORD;
|
4
4
|
result RECORD;
|
@@ -46,7 +46,8 @@ BEGIN
|
|
46
46
|
from pg_index ind
|
47
47
|
join pg_class idx on idx.oid = ind.indexrelid
|
48
48
|
join pg_class tbl on tbl.oid = ind.indrelid
|
49
|
-
left join pg_namespace ns on ns.oid = tbl.relnamespace
|
49
|
+
left join pg_namespace ns on ns.oid = tbl.relnamespace
|
50
|
+
where idx.relname != concat(table_name, '_pkey') and tbl.relname = table_name and ns.nspname = 'public' and NOT idx.relname = ANY(ignore_indexes::text[])
|
50
51
|
LOOP
|
51
52
|
BEGIN
|
52
53
|
EXECUTE
|
@@ -21,7 +21,7 @@ Resque.module_eval do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
if defined?(Resque)
|
24
|
+
if defined?(Resque.logger)
|
25
25
|
Resque.logger = ZuoraConnect.custom_logger(name: "Resque", type: 'Monologger', level: MonoLogger::INFO)
|
26
26
|
Resque::Scheduler.logger = ZuoraConnect.custom_logger(name: "ResqueScheduler") if defined?(Resque::Scheduler)
|
27
27
|
end
|
data/lib/zuora_connect.rb
CHANGED