zuora_connect 2.0.49 → 2.0.50
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 +10 -6
- data/lib/resque/dynamic_queues.rb +1 -1
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac63d84930258a8a27d1c150179f4350bb82391b43966f281f2d5438df626430
|
4
|
+
data.tar.gz: cf7d90134028cfde95364489b685172cbc38a1e97253d78f6fb2d75aad7a4452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a932232c898ef0f65677055094c3de1eeef0b67eee9a94345958c7858153f8f1371e8625865bd2b3e26ed034b85d141b6b8af8eb6925d1379bb8de855c539753
|
7
|
+
data.tar.gz: 0c4abe94469066d788b0fad912c9934620c6ea00255bd71ef56d575e5b97909ca8ea8811af1a74afae86b18aa0716a55b65cd43b968d3edbc846118d6e148f21
|
@@ -1123,6 +1123,8 @@ module ZuoraConnect
|
|
1123
1123
|
### END S3 Helping Methods #####
|
1124
1124
|
|
1125
1125
|
### START Aggregate Grouping Helping Methods ####
|
1126
|
+
# Traverse entire database and run a query on table(table_name) with where clause(where_clause)
|
1127
|
+
# Data from each schema will be loaded into table(aggregate_name) into the public schema
|
1126
1128
|
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: [])
|
1127
1129
|
self.update_functions
|
1128
1130
|
if index_table
|
@@ -1132,8 +1134,12 @@ module ZuoraConnect
|
|
1132
1134
|
end
|
1133
1135
|
end
|
1134
1136
|
|
1137
|
+
# Load a psql script as a function in a transaction lock
|
1135
1138
|
def self.update_functions
|
1136
|
-
ActiveRecord::Base.
|
1139
|
+
ActiveRecord::Base.transaction do
|
1140
|
+
ActiveRecord::Base.connection.execute("SELECT pg_advisory_xact_lock(#{Zlib.crc32('refresh_aggregate_table')})")
|
1141
|
+
ActiveRecord::Base.connection.execute(File.read("#{Gem.loaded_specs["zuora_connect"].gem_dir}/app/views/sql/refresh_aggregate_table.txt"))
|
1142
|
+
end
|
1137
1143
|
end
|
1138
1144
|
### END Aggregate Grouping Helping Methods #####
|
1139
1145
|
|
@@ -1156,15 +1162,13 @@ module ZuoraConnect
|
|
1156
1162
|
end
|
1157
1163
|
|
1158
1164
|
def reload_attributes(selected_attributes)
|
1159
|
-
raise "Attibutes must be array"
|
1160
|
-
|
1161
|
-
selected_attributes.uniq!
|
1162
|
-
value_attributes = self.class.unscoped.where(id: id).select(selected_attributes).first.attributes
|
1165
|
+
raise "Attibutes must be array" if selected_attributes.class != Array
|
1166
|
+
value_attributes = self.class.unscoped.where(:id=>id).select(selected_attributes).first.attributes
|
1163
1167
|
value_attributes.each do |key, value|
|
1164
1168
|
next if key == "id" && value.blank?
|
1165
1169
|
self.send(:write_attribute, key, value)
|
1166
1170
|
end
|
1167
|
-
self
|
1171
|
+
return self
|
1168
1172
|
end
|
1169
1173
|
|
1170
1174
|
def instance_failure(failure)
|
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: 2.0.
|
4
|
+
version: 2.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|