panther 4.2.1__py3-none-any.whl → 4.2.2__py3-none-any.whl
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.
- panther/__init__.py +1 -1
- panther/base_websocket.py +9 -5
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/METADATA +1 -1
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/RECORD +8 -8
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/LICENSE +0 -0
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/WHEEL +0 -0
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/entry_points.txt +0 -0
- {panther-4.2.1.dist-info → panther-4.2.2.dist-info}/top_level.txt +0 -0
panther/__init__.py
CHANGED
panther/base_websocket.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import asyncio
|
4
|
-
import
|
4
|
+
import orjson as json
|
5
5
|
from multiprocessing.managers import SyncManager
|
6
6
|
from typing import TYPE_CHECKING, Literal
|
7
7
|
|
8
|
-
import
|
9
|
-
|
8
|
+
import logging
|
10
9
|
from panther import status
|
11
10
|
from panther.base_request import BaseRequest
|
12
11
|
from panther.configs import config
|
@@ -53,9 +52,14 @@ class WebsocketConnections(Singleton):
|
|
53
52
|
logger.info("Subscribed to 'websocket_connections' queue")
|
54
53
|
while True:
|
55
54
|
try:
|
56
|
-
received_message = queue.get
|
55
|
+
received_message = await asyncio.to_thread(queue.get)
|
56
|
+
if received_message is None:
|
57
|
+
# The None came from the CancelledError, so break the loop
|
58
|
+
break
|
57
59
|
await self._handle_received_message(received_message=received_message)
|
58
|
-
except InterruptedError:
|
60
|
+
except (InterruptedError, asyncio.CancelledError):
|
61
|
+
# Put the None to the queue, so the executor knows that it ends
|
62
|
+
queue.put(None)
|
59
63
|
break
|
60
64
|
else:
|
61
65
|
# We have a redis connection, so use it for pubsub
|
@@ -1,11 +1,11 @@
|
|
1
|
-
panther/__init__.py,sha256=
|
1
|
+
panther/__init__.py,sha256=Sv6vixQQrNOJFV4kgGUL-pMtNbXp7MrXCoCs7BYP6p0,110
|
2
2
|
panther/_load_configs.py,sha256=AVkoixkUFkBQiTmrLrwCmg0eiPW2U_Uw2EGNEGQRfnI,9281
|
3
3
|
panther/_utils.py,sha256=j0rwIxTf0rtcZAAD-1nGE-_bWpvinyKtnwt3uO0hMmY,4330
|
4
4
|
panther/app.py,sha256=e2eb4sXIaBje5vpcm4pbvvEO_sj83pLfBHCIZJFFX38,8222
|
5
5
|
panther/authentications.py,sha256=gf7BVyQ8vXKhiumJAtD0aAK7uIHWx_snbOKYAKrYuVw,5677
|
6
6
|
panther/background_tasks.py,sha256=HBYubDIiO_673cl_5fqCUP9zzimzRgRkDSkag9Msnbs,7656
|
7
7
|
panther/base_request.py,sha256=XD2v1gLWcCKHePowRxT6_fYnS4tdKFxTLINMX0HQu8M,3880
|
8
|
-
panther/base_websocket.py,sha256=
|
8
|
+
panther/base_websocket.py,sha256=L0tiQQjg7E3462cd91PMf_SoVMMK4YiwW45yTFdTLhY,10973
|
9
9
|
panther/caching.py,sha256=ltuJYdjNiAaKIs3jpO5EBpL8Y6CF1vAIQqh8J_Np10g,4098
|
10
10
|
panther/configs.py,sha256=EaLApT6nYcguBoNXBG_8n6DU6HTNxsulI2943j8UAkE,3174
|
11
11
|
panther/events.py,sha256=bxDqrfiNNBlvD03vEk2LDK4xbMzTMFVcgAjx2ein7mI,1158
|
@@ -49,9 +49,9 @@ panther/panel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
49
|
panther/panel/apis.py,sha256=COsbwKZyTgyHvHYbpDfusifAH9ojMS3z1KhZCt9M-Ms,2428
|
50
50
|
panther/panel/urls.py,sha256=JiV-H4dWE-m_bfaTTVxzOxTvJmOWhyLOvcbM7xU3Bn4,240
|
51
51
|
panther/panel/utils.py,sha256=0Rv79oR5IEqalqwpRKQHMn1p5duVY5mxMqDKiA5mWx4,437
|
52
|
-
panther-4.2.
|
53
|
-
panther-4.2.
|
54
|
-
panther-4.2.
|
55
|
-
panther-4.2.
|
56
|
-
panther-4.2.
|
57
|
-
panther-4.2.
|
52
|
+
panther-4.2.2.dist-info/LICENSE,sha256=2aF1hL2aC0zRPjzUkSxJUzZbn2_uLoOkn7DHjzZni-I,1524
|
53
|
+
panther-4.2.2.dist-info/METADATA,sha256=WuUnOJAvGmczG9Mq0UJu0dKjaFLDqL6Vqvvh0cceGD0,6376
|
54
|
+
panther-4.2.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
55
|
+
panther-4.2.2.dist-info/entry_points.txt,sha256=6GPxYFGuzVfNB4YpHFJvYex6iWah5_tLnirAHwj2Qsg,51
|
56
|
+
panther-4.2.2.dist-info/top_level.txt,sha256=VbBs02JGXTIoHMzsX-eLOk2MCbBZzQbLhWiYpI7xI2g,8
|
57
|
+
panther-4.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|