satori-python 0.17.6__tar.gz → 0.17.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {satori_python-0.17.6 → satori_python-0.17.7}/PKG-INFO +1 -1
- {satori_python-0.17.6 → satori_python-0.17.7}/pyproject.toml +1 -1
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/__init__.py +1 -1
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/__init__.py +7 -1
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/__init__.py +3 -1
- {satori_python-0.17.6 → satori_python-0.17.7}/LICENSE +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/README.md +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/_vendor/fleep.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/account.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/account.pyi +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/config.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/network/__init__.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/network/base.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/network/util.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/network/webhook.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/network/websocket.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/client/protocol.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/const.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/element.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/event.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/exception.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/model.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/parser.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/adapter.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/connection.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/formdata.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/model.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/route.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/server/utils.py +0 -0
- {satori_python-0.17.6 → satori_python-0.17.7}/src/satori/utils.py +0 -0
|
@@ -4,6 +4,7 @@ import asyncio
|
|
|
4
4
|
import functools
|
|
5
5
|
import signal
|
|
6
6
|
import threading
|
|
7
|
+
import traceback
|
|
7
8
|
from collections.abc import Awaitable, Callable, Iterable
|
|
8
9
|
from functools import wraps
|
|
9
10
|
from typing import TYPE_CHECKING, Any, Literal, TypeVar, overload
|
|
@@ -279,7 +280,12 @@ class App(Service):
|
|
|
279
280
|
account = self.accounts[login_sn]
|
|
280
281
|
|
|
281
282
|
if self.event_callbacks:
|
|
282
|
-
|
|
283
|
+
task = asyncio.gather(*(callback(account, event) for callback in self.event_callbacks))
|
|
284
|
+
try:
|
|
285
|
+
await task
|
|
286
|
+
except Exception:
|
|
287
|
+
traceback.print_exc()
|
|
288
|
+
task.cancel()
|
|
283
289
|
|
|
284
290
|
if event.type == EventType.LOGIN_REMOVED:
|
|
285
291
|
logger.info(f"account removed: {account}")
|
|
@@ -332,7 +332,9 @@ class Server(Service, RouterMixin):
|
|
|
332
332
|
else:
|
|
333
333
|
continue
|
|
334
334
|
return await _request_handler(action, request, func, platform, self_id)
|
|
335
|
-
return Response(
|
|
335
|
+
return Response(
|
|
336
|
+
status_code=404, content=f"Action {action!r} is not supported in current platform {platform!r}."
|
|
337
|
+
)
|
|
336
338
|
|
|
337
339
|
async def proxy_url_handler(self, request: StarletteRequest):
|
|
338
340
|
url = request.path_params["internal_url"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|