progression 50% pour evolution des joueurs
CI - Security, Lint & Tests / validate (push) Failing after 1m13s
CI - Security, Lint & Tests / validate (push) Failing after 1m13s
This commit is contained in:
+15
-6
@@ -415,14 +415,23 @@ def start() -> str:
|
||||
# 3. Create the application database (idempotent).
|
||||
_create_database()
|
||||
|
||||
# 4. Register cleanup.
|
||||
# 4. Register cleanup (only in the *parent* process, not the reloader
|
||||
# worker — the worker registers its own and tears the database down
|
||||
# behind any sibling process that is still connected).
|
||||
#
|
||||
# The Werkzeug reloader sets WERKZEUG_RUN_MAIN=true in the worker
|
||||
# process and leaves it unset (or false) in the watcher process that
|
||||
# acts as the parent. We want the cleanup on the *actual process
|
||||
# lifecycle*, i.e. when the watcher exits, not every time the
|
||||
# reloader restarts the worker.
|
||||
if not _started:
|
||||
_started = True
|
||||
atexit.register(_stop)
|
||||
with contextlib.suppress(ValueError, OSError):
|
||||
signal.signal(signal.SIGINT, _stop)
|
||||
with contextlib.suppress(AttributeError, ValueError, OSError):
|
||||
signal.signal(signal.SIGBREAK, _stop) # type: ignore[attr-defined]
|
||||
if os.environ.get('WERKZEUG_RUN_MAIN', '').lower() != 'true':
|
||||
atexit.register(_stop)
|
||||
with contextlib.suppress(ValueError, OSError):
|
||||
signal.signal(signal.SIGINT, _stop)
|
||||
with contextlib.suppress(AttributeError, ValueError, OSError):
|
||||
signal.signal(signal.SIGBREAK, _stop) # type: ignore[attr-defined]
|
||||
|
||||
logger.info('Local PostgreSQL ready — DATABASE_URL=%s', DATABASE_URL)
|
||||
return DATABASE_URL
|
||||
|
||||
Reference in New Issue
Block a user