Dockerfile-workers: spell out when config isn't generated (#15186)
* Complement: Spell out when config isn't generated * Changelogpull/15189/head
parent
8ef324ea6f
commit
c4f4dc35cd
|
@ -0,0 +1 @@
|
||||||
|
Improve startup logging in the with-workers Docker image.
|
|
@ -675,17 +675,21 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
|
||||||
if not os.path.exists(config_path):
|
if not os.path.exists(config_path):
|
||||||
log("Generating base homeserver config")
|
log("Generating base homeserver config")
|
||||||
generate_base_homeserver_config()
|
generate_base_homeserver_config()
|
||||||
|
else:
|
||||||
|
log("Base homeserver config exists—not regenerating")
|
||||||
# This script may be run multiple times (mostly by Complement, see note at top of file).
|
# This script may be run multiple times (mostly by Complement, see note at top of file).
|
||||||
# Don't re-configure workers in this instance.
|
# Don't re-configure workers in this instance.
|
||||||
mark_filepath = "/conf/workers_have_been_configured"
|
mark_filepath = "/conf/workers_have_been_configured"
|
||||||
if not os.path.exists(mark_filepath):
|
if not os.path.exists(mark_filepath):
|
||||||
# Always regenerate all other config files
|
# Always regenerate all other config files
|
||||||
|
log("Generating worker config files")
|
||||||
generate_worker_files(environ, config_path, data_dir)
|
generate_worker_files(environ, config_path, data_dir)
|
||||||
|
|
||||||
# Mark workers as being configured
|
# Mark workers as being configured
|
||||||
with open(mark_filepath, "w") as f:
|
with open(mark_filepath, "w") as f:
|
||||||
f.write("")
|
f.write("")
|
||||||
|
else:
|
||||||
|
log("Worker config exists—not regenerating")
|
||||||
|
|
||||||
# Lifted right out of start.py
|
# Lifted right out of start.py
|
||||||
jemallocpath = "/usr/lib/%s-linux-gnu/libjemalloc.so.2" % (platform.machine(),)
|
jemallocpath = "/usr/lib/%s-linux-gnu/libjemalloc.so.2" % (platform.machine(),)
|
||||||
|
|
Loading…
Reference in New Issue