zuora_connect 1.7.45 → 1.7.46
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 -1
- data/lib/zuora_connect/railtie.rb +4 -1
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b536f14ed9b0e8fdecc41825ecec6174ca0b9aa
|
4
|
+
data.tar.gz: 4fe2ce45e03947a11110ddb49d8d23e8a7d0904d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12319d3172d4a99913c7906d0fe055dea9f300fc840ff0547601de7b0f5b36010f556fab0215a50c61c88cca2458a86b603afcd796080bb27669c1cfb8de9592
|
7
|
+
data.tar.gz: 4fc810bff17da49a7ab79673fc477ef3dae957ff70b30d4b51b2607abe248d5c735c1485bddad2e08cd4449e42fb2f288a28440f357b44c2e36777221229c1c7
|
@@ -4,7 +4,7 @@ module ZuoraConnect
|
|
4
4
|
default_scope {select(ZuoraConnect::AppInstance.column_names.delete_if {|x| ["catalog_mapping", "catalog"].include?(x) }) }
|
5
5
|
after_initialize :init
|
6
6
|
self.table_name = "zuora_connect_app_instances"
|
7
|
-
attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user
|
7
|
+
attr_accessor :options, :mode, :logins, :task_data, :last_refresh, :username, :password, :s3_client, :api_version, :drop_message, :new_session_message, :connect_user, :logitems
|
8
8
|
@@telegraf_host = nil
|
9
9
|
REFRESH_TIMEOUT = 2.minute #Used to determine how long to wait on current refresh call before executing another
|
10
10
|
INSTANCE_REFRESH_WINDOW = 1.hours #Used to set how how long till app starts attempting to refresh cached task connect data
|
@@ -16,6 +16,7 @@ module ZuoraConnect
|
|
16
16
|
|
17
17
|
def init
|
18
18
|
self.connect_user = 'Nobody'
|
19
|
+
self.logitems = {}
|
19
20
|
self.options = Hash.new
|
20
21
|
self.logins = Hash.new
|
21
22
|
self.api_version = "v2"
|
@@ -185,6 +186,14 @@ module ZuoraConnect
|
|
185
186
|
end
|
186
187
|
|
187
188
|
#### START Metrics Mathods ####
|
189
|
+
def logitem(item: {}, reset: false)
|
190
|
+
self.logitems = {} if self.logitems.class != Hash
|
191
|
+
if item.class == Hash
|
192
|
+
self.logitems = reset ? item : self.logitems.merge(item)
|
193
|
+
end
|
194
|
+
Thread.current[:appinstance] = self
|
195
|
+
end
|
196
|
+
|
188
197
|
def self.write_to_telegraf(*args)
|
189
198
|
if ZuoraConnect.configuration.enable_metrics
|
190
199
|
@@telegraf_host = ZuoraConnect::Telegraf.new() if @@telegraf_host == nil
|
@@ -51,7 +51,10 @@ module ZuoraConnect
|
|
51
51
|
}
|
52
52
|
if Thread.current[:appinstance].present?
|
53
53
|
items.merge({appinstance_id: Thread.current[:appinstance].id, connect_user: Thread.current[:appinstance].connect_user, new_session: Thread.current[:appinstance].new_session_message})
|
54
|
-
|
54
|
+
if Thread.current[:appinstance].logitems.present? && Thread.current[:appinstance].logitems.class == Hash
|
55
|
+
items.merge(Thread.current[:appinstance].logitems)
|
56
|
+
end
|
57
|
+
end
|
55
58
|
end
|
56
59
|
end
|
57
60
|
end
|
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.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|