orchestrator-lso 2.4.1__py3-none-any.whl → 2.4.2__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.
lso/__init__.py
CHANGED
lso/tasks.py
CHANGED
|
@@ -45,16 +45,21 @@ def playbook_event_handler_factory(
|
|
|
45
45
|
This is used to send incremental progress updates to the external system that called for this playbook to be run.
|
|
46
46
|
|
|
47
47
|
:param str progress: The progress URL where the external system expects to receive updates.
|
|
48
|
-
:param bool progress_is_incremental: Whether progress updates are sent incrementally, or
|
|
49
|
-
event data.
|
|
48
|
+
:param bool progress_is_incremental: Whether progress updates are sent incrementally, or contain the whole history
|
|
49
|
+
of event data.
|
|
50
50
|
"""
|
|
51
51
|
events_stdout = []
|
|
52
52
|
|
|
53
53
|
def _playbook_event_handler(event: dict) -> bool:
|
|
54
|
+
event_data = event["stdout"].strip()
|
|
55
|
+
if not event_data:
|
|
56
|
+
return False
|
|
57
|
+
|
|
58
|
+
event_data_lines = event_data.split("\r\n")
|
|
54
59
|
if progress_is_incremental:
|
|
55
|
-
emit_body =
|
|
60
|
+
emit_body = event_data_lines
|
|
56
61
|
else:
|
|
57
|
-
events_stdout.
|
|
62
|
+
events_stdout.extend(event_data_lines)
|
|
58
63
|
emit_body = events_stdout
|
|
59
64
|
|
|
60
65
|
requests.post(str(progress), json={"progress": emit_body}, timeout=settings.REQUEST_TIMEOUT_SEC)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lso/__init__.py,sha256
|
|
1
|
+
lso/__init__.py,sha256=-1xhYhBAtzdi8TaFrK-xyzqp29irj-3lhitkNlZefyU,1589
|
|
2
2
|
lso/app.py,sha256=PCdL4hY5i1fho_pMSiNAHuaIKWPgfQNyePsZ-LdasCg,775
|
|
3
3
|
lso/config.py,sha256=tyxjq67EJLEMLmpIlkxrtwJ3arm8ZUBNGkj9NTsBJxw,1639
|
|
4
4
|
lso/environment.py,sha256=4k8a8cSLwgLjBIU-XUa7Y6Clns2VjmsBkiKvkzK2Pp4,1771
|
|
@@ -9,9 +9,9 @@ lso/routes/default.py,sha256=ScSrDFjbGqjcjeOodMTKZUMzZqXZ0zC6L-I9hrP0dqk,1438
|
|
|
9
9
|
lso/routes/execute.py,sha256=nDmilV2THCnPzAIHGUjYBuETrL0QeOQSUC7z5M3EaMA,2713
|
|
10
10
|
lso/routes/playbook.py,sha256=9ughP7zqnqRpBV31KQbTMoJdfgzF0qyjxiXw1l3TlUE,5270
|
|
11
11
|
lso/schema.py,sha256=Xp4D7FRc21Mhh-1xlp0EbjTvdu5kGEHRpQvQp6ic6ro,1518
|
|
12
|
-
lso/tasks.py,sha256=
|
|
12
|
+
lso/tasks.py,sha256=F-Wbis-ylL7Vwy6qMu2fS-S9WRzIUvkkIcD8LFCDMUw,6377
|
|
13
13
|
lso/utils.py,sha256=eVKyYRtdu_yPkbUQqDJlCKlCPAgc0dFxG1E1kY2Qsao,1043
|
|
14
14
|
lso/worker.py,sha256=ZAXii3EctILrpnHInvVMTyjOs_40gqR_VybVLBzGRw4,1727
|
|
15
|
-
orchestrator_lso-2.4.
|
|
16
|
-
orchestrator_lso-2.4.
|
|
17
|
-
orchestrator_lso-2.4.
|
|
15
|
+
orchestrator_lso-2.4.2.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
|
|
16
|
+
orchestrator_lso-2.4.2.dist-info/METADATA,sha256=uQS0-YaAJ6xo-8_PtrT65XdKjlZtdmsl-ZCvw0sLtFk,5621
|
|
17
|
+
orchestrator_lso-2.4.2.dist-info/RECORD,,
|
|
File without changes
|