assemblyline-v4-service 4.4.1.dev30__py3-none-any.whl → 4.4.1.dev32__py3-none-any.whl
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.
Potentially problematic release.
This version of assemblyline-v4-service might be problematic. Click here for more details.
- assemblyline_v4_service/VERSION +1 -1
- assemblyline_v4_service/updater/updater.py +17 -3
- {assemblyline_v4_service-4.4.1.dev30.dist-info → assemblyline_v4_service-4.4.1.dev32.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.4.1.dev30.dist-info → assemblyline_v4_service-4.4.1.dev32.dist-info}/RECORD +7 -7
- {assemblyline_v4_service-4.4.1.dev30.dist-info → assemblyline_v4_service-4.4.1.dev32.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.4.1.dev30.dist-info → assemblyline_v4_service-4.4.1.dev32.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.4.1.dev30.dist-info → assemblyline_v4_service-4.4.1.dev32.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.4.1.
|
|
1
|
+
4.4.1.dev32
|
|
@@ -107,14 +107,17 @@ class ServiceUpdater(ThreadedCoreBase):
|
|
|
107
107
|
host=self.config.core.redis.nonpersistent.host,
|
|
108
108
|
port=self.config.core.redis.nonpersistent.port)
|
|
109
109
|
|
|
110
|
-
self.
|
|
110
|
+
self.watcher_wakeup_flag = threading.Event()
|
|
111
|
+
self.service_change_watcher = EventWatcher(self.redis, deserializer=ServiceChange.deserialize,
|
|
112
|
+
error_event=self.watcher_wakeup_flag)
|
|
111
113
|
self.service_change_watcher.register(f'changes.services.{SERVICE_NAME}', self._handle_service_change_event)
|
|
112
114
|
|
|
113
|
-
self.signature_change_watcher = EventWatcher(self.redis, deserializer=SignatureChange.deserialize
|
|
115
|
+
self.signature_change_watcher = EventWatcher(self.redis, deserializer=SignatureChange.deserialize,
|
|
116
|
+
error_event=self.watcher_wakeup_flag)
|
|
114
117
|
self.signature_change_watcher.register(f'changes.signatures.{SERVICE_NAME.lower()}',
|
|
115
118
|
self._handle_signature_change_event)
|
|
116
119
|
|
|
117
|
-
self.source_update_watcher = EventWatcher(self.redis)
|
|
120
|
+
self.source_update_watcher = EventWatcher(self.redis, error_event=self.watcher_wakeup_flag)
|
|
118
121
|
self.source_update_watcher.register(f'changes.sources.{SERVICE_NAME.lower()}',
|
|
119
122
|
self._handle_source_update_event)
|
|
120
123
|
|
|
@@ -132,6 +135,7 @@ class ServiceUpdater(ThreadedCoreBase):
|
|
|
132
135
|
'Outward HTTP Server': self._run_http,
|
|
133
136
|
'Run source updates': self._run_source_updates,
|
|
134
137
|
'Run local updates': self._run_local_updates,
|
|
138
|
+
'Reconnect Handler': self._reconnect_watcher,
|
|
135
139
|
}
|
|
136
140
|
# Only used by updater with 'generates_signatures: false'
|
|
137
141
|
self.latest_updates_dir = os.path.join(UPDATER_DIR, 'latest_updates')
|
|
@@ -195,6 +199,7 @@ class ServiceUpdater(ThreadedCoreBase):
|
|
|
195
199
|
self.source_update_flag.set()
|
|
196
200
|
self.local_update_flag.set()
|
|
197
201
|
self.local_update_start.set()
|
|
202
|
+
self.watcher_wakeup_flag.set()
|
|
198
203
|
|
|
199
204
|
def try_run(self):
|
|
200
205
|
self.signature_change_watcher.start()
|
|
@@ -202,6 +207,15 @@ class ServiceUpdater(ThreadedCoreBase):
|
|
|
202
207
|
self.source_update_watcher.start()
|
|
203
208
|
self.maintain_threads(self.expected_threads)
|
|
204
209
|
|
|
210
|
+
def _reconnect_watcher(self):
|
|
211
|
+
while self.running:
|
|
212
|
+
if self.watcher_wakeup_flag.wait():
|
|
213
|
+
self.watcher_wakeup_flag.clear()
|
|
214
|
+
if self.running:
|
|
215
|
+
self._pull_settings()
|
|
216
|
+
self.local_update_flag.set()
|
|
217
|
+
self.source_update_flag.set()
|
|
218
|
+
|
|
205
219
|
def _run_http(self):
|
|
206
220
|
# Start a server for our http interface in a separate process
|
|
207
221
|
my_env = os.environ.copy()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256=
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=gZoxNNgbHk5n4Hq1P_PmFqtbCdncYtdWujgH3yy4bzc,12
|
|
2
2
|
assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
|
|
4
4
|
assemblyline_v4_service/run_privileged_service.py,sha256=9uTfHetXR5G-EDKMDrgfWUOw34yr64-cj6Cm9eZaCbQ,14547
|
|
@@ -46,9 +46,9 @@ assemblyline_v4_service/updater/__main__.py,sha256=9Os-u8Tf7MD73JSrUSPmOaErTgfve
|
|
|
46
46
|
assemblyline_v4_service/updater/app.py,sha256=Ass5DZtOCr0tdoRbLo7Qn8Ujlw8T8mUDroAaHxx2oMo,3198
|
|
47
47
|
assemblyline_v4_service/updater/gunicorn_config.py,sha256=p3j2KPBeD5jvMw9O5i7vAtlRgPSVVxIG9AO0DfN82J8,1247
|
|
48
48
|
assemblyline_v4_service/updater/helper.py,sha256=JD0gX3KHY-wvsFjTbWkT83F0d5Up3OfubMPinuNzbTQ,9069
|
|
49
|
-
assemblyline_v4_service/updater/updater.py,sha256=
|
|
50
|
-
assemblyline_v4_service-4.4.1.
|
|
51
|
-
assemblyline_v4_service-4.4.1.
|
|
52
|
-
assemblyline_v4_service-4.4.1.
|
|
53
|
-
assemblyline_v4_service-4.4.1.
|
|
54
|
-
assemblyline_v4_service-4.4.1.
|
|
49
|
+
assemblyline_v4_service/updater/updater.py,sha256=t3QyMMIGDUQEPXCkR3Q4InQlGsbC31MMUSRoCdAplnI,29718
|
|
50
|
+
assemblyline_v4_service-4.4.1.dev32.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
51
|
+
assemblyline_v4_service-4.4.1.dev32.dist-info/METADATA,sha256=_WwOMdJVwP-tgSibgxGIeLtexLWodm98Qoh0Cqz8o_I,9359
|
|
52
|
+
assemblyline_v4_service-4.4.1.dev32.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
53
|
+
assemblyline_v4_service-4.4.1.dev32.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
|
|
54
|
+
assemblyline_v4_service-4.4.1.dev32.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|