Hard-reload on integrity expiring during request;
Implement a way to hard-reload the application when the integrity token expires during a request, or inside its retry loop
This commit is contained in:
1 parent
f65c0922c2
commit
7d14b51221
4 files changed
+56
-15
No files matched your search
@@ -19,7 +19,7 @@ from typing import (
|
||||
import yarl
|
||||
|
||||
from constants import JsonType
|
||||
from exceptions import ExitRequest
|
||||
from exceptions import ExitRequest, ReloadRequest
|
||||
from constants import _resource_path as resource_path # noqa
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -77,7 +77,7 @@ def task_wrapper(
|
||||
async def wrapper(*args: _P.args, **kwargs: _P.kwargs):
|
||||
try:
|
||||
await afunc(*args, **kwargs)
|
||||
except ExitRequest:
|
||||
except (ExitRequest, ReloadRequest):
|
||||
pass
|
||||
except Exception:
|
||||
logger.exception("Exception in task")
|
||||
|
||||
Reference in new issue
Block a user