polyapi-python 0.2.4.dev8__py3-none-any.whl → 0.2.4.dev9__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.
polyapi/webhook.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import asyncio
2
2
  import socketio # type: ignore
3
+ from socketio.exceptions import ConnectionError # type: ignore
3
4
  import uuid
4
5
  from typing import Any, Dict, List, Tuple
5
6
 
@@ -92,8 +93,12 @@ async def unregister(data: Dict[str, Any]):
92
93
 
93
94
  async def unregister_all():
94
95
  _, base_url = get_api_key_and_url()
95
- # need to reconnect because maybe socketio client disconnected after Ctrl+C?
96
- await client.connect(base_url, transports=["websocket"], namespaces=["/events"])
96
+ # maybe need to reconnect because maybe socketio client disconnected after Ctrl+C?
97
+ # feels like Linux disconnects but Windows stays connected
98
+ try:
99
+ await client.connect(base_url, transports=["websocket"], namespaces=["/events"])
100
+ except ConnectionError:
101
+ pass
97
102
  await asyncio.gather(*[unregister(handler) for handler in active_handlers])
98
103
 
99
104
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.4.dev8
3
+ Version: 0.2.4.dev9
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -18,9 +18,9 @@ polyapi/server.py,sha256=iXUR1Kd5TnWK-V5qHhvFvQuHx-3IcTv8WChXVY5Mbog,1882
18
18
  polyapi/typedefs.py,sha256=a5WfHaAvjeql3y1iA3_SkpUztTbKvS5bPqkVxkCvr9E,1459
19
19
  polyapi/utils.py,sha256=UD3uV3kzt2w23zxAdHCUROhdvtdO44KCJIpqnFwEhqE,5937
20
20
  polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
21
- polyapi/webhook.py,sha256=AAioBn4H3gp7Zaxyp5_MnW-61rAIggi4T6WisgHpz1k,3977
22
- polyapi_python-0.2.4.dev8.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
- polyapi_python-0.2.4.dev8.dist-info/METADATA,sha256=VEizn1nBPNVNIOSUSeT67sxfd33N4AKxagz6IyHkcZU,4867
24
- polyapi_python-0.2.4.dev8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
- polyapi_python-0.2.4.dev8.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
- polyapi_python-0.2.4.dev8.dist-info/RECORD,,
21
+ polyapi/webhook.py,sha256=wktcRMGhrYiHvSn4eDM87_9GXfPE35OzJ3lKXJX0HBY,4164
22
+ polyapi_python-0.2.4.dev9.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
+ polyapi_python-0.2.4.dev9.dist-info/METADATA,sha256=3h9Zb7Xbcqe6sWZDSyB9UBeM0jaOf-gqLfCP4m1rk6Y,4867
24
+ polyapi_python-0.2.4.dev9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
25
+ polyapi_python-0.2.4.dev9.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
+ polyapi_python-0.2.4.dev9.dist-info/RECORD,,