mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
Removing start_initialize_flags because flags are initted in perpetual_check_db_is_up_worker. Logging when flags are initialized.
This commit is contained in:
parent
d0c9bec7f4
commit
a65fa1c6fb
2 changed files with 4 additions and 10 deletions
10
main.py
10
main.py
|
|
@ -269,16 +269,6 @@ async def start_sanic_worker(app: Sanic):
|
|||
await app.dispatch('wrolpi.periodic.check_log_level')
|
||||
|
||||
|
||||
@api_app.listener('after_server_start')
|
||||
async def start_initialize_flags(app: Sanic):
|
||||
# Only allow one child process to initialize flags.
|
||||
if not app.shared_ctx.flags_initialized.is_set():
|
||||
logger.info('start_initialize_flags')
|
||||
app.shared_ctx.flags_initialized.set()
|
||||
async with flags.db_up.wait_for():
|
||||
flags.init_flags()
|
||||
|
||||
|
||||
@api_app.signal('wrolpi.periodic.check_log_level')
|
||||
async def periodic_check_log_level():
|
||||
"""Copies global log level into this Sanic worker's logger."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue