zuora_connect 2.0.57k → 2.0.57l
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/app/models/zuora_connect/app_instance_base.rb +9 -0
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97962e636b5c230c4575bce48a28de8a0c80e44794863b27e663736013f4693e
|
4
|
+
data.tar.gz: 6af68f301220898a4b4c52b6cdf793ca7b956bee5c77019d53a7eb8bf79b0791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59ef73c6afc140eee13418a6cf9b7a2b0343f74346e57334512af25111c0a2c4e950c0eae517b44235e7e7b440cf5feee87c9a2126e57d01c9bc114fea0491eb
|
7
|
+
data.tar.gz: 7d94fabce0bd79d30598632922b4637fdf67cd88e2232d968a79b67f61fa2c977d75d95d79d1a6d0a531ee5ae721968ae54047a457806584b97b77f32277d770
|
@@ -1121,6 +1121,15 @@ module ZuoraConnect
|
|
1121
1121
|
# Data from each schema will be loaded into table(aggregate_name) into the public schema
|
1122
1122
|
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: [])
|
1123
1123
|
self.update_functions
|
1124
|
+
|
1125
|
+
sql_result = ActiveRecord::Base.connection.execute <<-eos
|
1126
|
+
SELECT pid, relname, mode
|
1127
|
+
FROM pg_locks l
|
1128
|
+
JOIN pg_class t ON l.relation = t.oid AND t.relkind = 'r'
|
1129
|
+
WHERE t.relname = '#{aggregate_name}' AND l.mode ='AccessExclusiveLock';
|
1130
|
+
eos
|
1131
|
+
return if sql_result.count > 0
|
1132
|
+
|
1124
1133
|
if index_table
|
1125
1134
|
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(',')])
|
1126
1135
|
else
|