Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit c4f4dc3

Browse files
author
David Robertson
authored
Dockerfile-workers: spell out when config isn't generated (#15186)
* Complement: Spell out when config isn't generated * Changelog
1 parent 8ef324e commit c4f4dc3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

changelog.d/15186.docker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve startup logging in the with-workers Docker image.

docker/configure_workers_and_start.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,17 +675,21 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
675675
if not os.path.exists(config_path):
676676
log("Generating base homeserver config")
677677
generate_base_homeserver_config()
678-
678+
else:
679+
log("Base homeserver config exists—not regenerating")
679680
# This script may be run multiple times (mostly by Complement, see note at top of file).
680681
# Don't re-configure workers in this instance.
681682
mark_filepath = "/conf/workers_have_been_configured"
682683
if not os.path.exists(mark_filepath):
683684
# Always regenerate all other config files
685+
log("Generating worker config files")
684686
generate_worker_files(environ, config_path, data_dir)
685687

686688
# Mark workers as being configured
687689
with open(mark_filepath, "w") as f:
688690
f.write("")
691+
else:
692+
log("Worker config exists—not regenerating")
689693

690694
# Lifted right out of start.py
691695
jemallocpath = "/usr/lib/%s-linux-gnu/libjemalloc.so.2" % (platform.machine(),)

0 commit comments

Comments
 (0)