mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix typo in scheduler and add more logs to swarm tests
This commit is contained in:
parent
35d1564d8a
commit
07140a5e72
2 changed files with 16 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ def generate_external_plugins(plugins: List[Dict[str, Any]], *, original_path: U
|
|||
original_path.mkdir(parents=True, exist_ok=True)
|
||||
for plugin in plugins:
|
||||
try:
|
||||
if not plugin["data"]:
|
||||
if plugin["data"]:
|
||||
tmp_path = original_path.joinpath(plugin["id"], f"{plugin['name']}.tar.gz")
|
||||
tmp_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp_path.write_bytes(plugin["data"])
|
||||
|
|
|
|||
|
|
@ -171,6 +171,21 @@ class SwarmTest(Test):
|
|||
sleep(1)
|
||||
i += 1
|
||||
if not healthy:
|
||||
proc = run(
|
||||
'docker stack services --format "{{ .Name }}" ' + self._name,
|
||||
cwd="/tmp/swarm",
|
||||
shell=True,
|
||||
capture_output=True,
|
||||
)
|
||||
for service in proc.stdout.decode().splitlines():
|
||||
proc2 = run(
|
||||
'docker service ps ' + service,
|
||||
cwd="/tmp/swarm",
|
||||
shell=True,
|
||||
capture_output=True,
|
||||
)
|
||||
log("SWARM", "❌", f"stdout logs = {proc2.stdout.decode()}")
|
||||
log("SWARM", "❌", f"stderr logs = {proc2.stderr.decode()}")
|
||||
raise (Exception("swarm stack is not healthy"))
|
||||
except:
|
||||
log(
|
||||
|
|
|
|||
Loading…
Reference in a new issue