inventory_refresh 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inventory_refresh/persister.rb +30 -14
- data/lib/inventory_refresh/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: c540c1d669444a0a893718325bfb3873b6a5bb226793552f621b47f1c98cfb02
|
4
|
+
data.tar.gz: 48aab5996f73a6e720fd524a73d1e2df264c488a1d20b146881d1f86dcbd1b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75a5cedc2b2d4cb48e573beec12139548376b4ad660801634a50dea91ed957b3b754a07ec1e03b1e5c4302aafa0df58ec855766bf57ca755188f38a9ab2fd888
|
7
|
+
data.tar.gz: 0b3cb9116bb4b216fb34f3b109cbf3c53f560d42c006276076a8975782ed9338849b6407216634b32909c14f6155fd94e96dd0bfc8f848ac9ab3c4fc2c855b10
|
@@ -5,7 +5,10 @@ module InventoryRefresh
|
|
5
5
|
|
6
6
|
attr_reader :manager, :collections
|
7
7
|
|
8
|
-
attr_accessor :refresh_state_uuid, :refresh_state_part_uuid, :total_parts, :sweep_scope, :retry_count, :retry_max
|
8
|
+
attr_accessor :refresh_state_uuid, :refresh_state_part_uuid, :refresh_time_tracking, :total_parts, :sweep_scope, :retry_count, :retry_max
|
9
|
+
attr_accessor :persister_started_at, :persister_finished_at,
|
10
|
+
:refresh_state_part_collected_at, :refresh_state_part_sent_at,
|
11
|
+
:refresh_state_started_at, :refresh_state_sent_at, :ingress_api_sent_at
|
9
12
|
|
10
13
|
# @param manager [ManageIQ::Providers::BaseManager] A manager object
|
11
14
|
def initialize(manager)
|
@@ -13,6 +16,8 @@ module InventoryRefresh
|
|
13
16
|
|
14
17
|
@collections = {}
|
15
18
|
|
19
|
+
self.persister_started_at = Time.now.utc.to_datetime.to_s
|
20
|
+
|
16
21
|
initialize_inventory_collections
|
17
22
|
end
|
18
23
|
|
@@ -105,13 +110,19 @@ module InventoryRefresh
|
|
105
110
|
end.compact
|
106
111
|
|
107
112
|
{
|
108
|
-
:refresh_state_uuid
|
109
|
-
:refresh_state_part_uuid
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:
|
114
|
-
:
|
113
|
+
:refresh_state_uuid => refresh_state_uuid,
|
114
|
+
:refresh_state_part_uuid => refresh_state_part_uuid,
|
115
|
+
:refresh_state_part_collected_at => refresh_state_part_collected_at,
|
116
|
+
:refresh_state_part_sent_at => refresh_state_part_sent_at,
|
117
|
+
:refresh_state_started_at => refresh_state_started_at,
|
118
|
+
:refresh_state_sent_at => refresh_state_sent_at,
|
119
|
+
:ingress_api_sent_at => ingress_api_sent_at,
|
120
|
+
:refresh_time_tracking => refresh_time_tracking,
|
121
|
+
:retry_count => retry_count,
|
122
|
+
:retry_max => retry_max,
|
123
|
+
:total_parts => total_parts,
|
124
|
+
:sweep_scope => sweep_scope_to_hash(sweep_scope),
|
125
|
+
:collections => collections_data,
|
115
126
|
}
|
116
127
|
end
|
117
128
|
|
@@ -137,12 +148,17 @@ module InventoryRefresh
|
|
137
148
|
inventory_collection.from_hash(collection, persister.collections)
|
138
149
|
end
|
139
150
|
|
140
|
-
persister.refresh_state_uuid
|
141
|
-
persister.refresh_state_part_uuid
|
142
|
-
persister.
|
143
|
-
persister.
|
144
|
-
persister.
|
145
|
-
persister.
|
151
|
+
persister.refresh_state_uuid = persister_data['refresh_state_uuid']
|
152
|
+
persister.refresh_state_part_uuid = persister_data['refresh_state_part_uuid']
|
153
|
+
persister.refresh_state_part_collected_at = persister_data['refresh_state_part_collected_at']
|
154
|
+
persister.refresh_state_part_sent_at = persister_data['refresh_state_part_sent_at']
|
155
|
+
persister.refresh_state_started_at = persister_data['refresh_state_started_at']
|
156
|
+
persister.refresh_state_sent_at = persister_data['refresh_state_sent_at']
|
157
|
+
persister.ingress_api_sent_at = persister_data['ingress_api_sent_at']
|
158
|
+
persister.retry_count = persister_data['retry_count']
|
159
|
+
persister.retry_max = persister_data['retry_max']
|
160
|
+
persister.total_parts = persister_data['total_parts']
|
161
|
+
persister.sweep_scope = sweep_scope_from_hash(persister_data['sweep_scope'], persister.collections)
|
146
162
|
end
|
147
163
|
end
|
148
164
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inventory_refresh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|