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: 0554af6da95a649af2ffc7839f9cea5da4addf7200d28d5b693ec9336c5909b2
4
- data.tar.gz: 778f5318d97dc68d46f7f46c1f84da9fee0be469bceb85fa88bc0823e35d50d6
3
+ metadata.gz: 1a05037d88871d671bcb1d4093fc2dc729ebd7ffac6e63b3c6479fa40fe98a55
4
+ data.tar.gz: 20969c6650994e99025f0dec1180471d4b020b34b808eef2f1ad9d73fead1555
5
5
  SHA512:
6
- metadata.gz: 45338623f746a1947d498c6580778e3ef1b53976537f775ff8ff7098c397497a13ae5573c2c3d8bad9cd5d170ade8fddddd63b398e31e68b038c9670a2d59362
7
- data.tar.gz: 84c87616a1c9240176c848dab2bb82573dd125cd3c6d6613d4606e393796ac083d6e282670f7d53e694837591b1ac4359b1c9a1af684e011bf7de0378feb69aa
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 where idx.relname != concat(table_name, '_pkey') and tbl.relname = table_name and ns.nspname = 'public'
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
@@ -11,6 +11,7 @@ require 'resque/plugins/custom_logger'
11
11
  require 'logging/connect_formatter'
12
12
  require 'metrics/influx/point_value'
13
13
  require 'metrics/net'
14
+ require 'mono_logger'
14
15
 
15
16
  module ZuoraConnect
16
17
  class << self
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.11"
2
+ VERSION = "2.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team