-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean shutdown #62
Comments
Much of the "spam" seems to be coming from not closing |
This issue suggests Note: For reference, I add the following: As mentioned in the Discord, one option might be chaining |
Current "State of the Explosions™": ^CTraceback (most recent call last):
File "run.py", line 46, in <module>
loop.run_until_complete(run())
File "/usr/lib/python3.6/asyncio/base_events.py", line 454, in run_until_complete
self.run_forever()
File "/usr/lib/python3.6/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/usr/lib/python3.6/asyncio/base_events.py", line 1389, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.6/selectors.py", line 445, in select
fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed client session
client_session: <cactusbot.api.CactusAPI object at 0x7f523c9c7d30>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed client session
client_session: <cactusbot.services.beam.api.BeamAPI object at 0x7f523b8c9588>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed client session
client_session: <cactusbot.services.beam.constellation.BeamConstellation object at 0x7f523a84bf60>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed client session
client_session: <cactusbot.services.beam.chat.BeamChat object at 0x7f523a877898>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed response
client_response: <ClientResponse(wss://constellation.beam.pro) [101 Switching Protocols]>
<CIMultiDictProxy('Date': 'Tue, 28 Mar 2017 06:04:21 GMT', 'Connection': 'upgrade', 'Set-Cookie': '__cfduid=da921f6ac8042c15ddebab17be0b10fee1490681060; expires=Wed, 28-Mar-18 06:04:20 GMT; path=/; domain=.beam.pro; HttpOnly', 'Upgrade': 'websocket', 'Sec-Websocket-Accept': '5Yi/47qTD/aKRhK+Yil8eweKWyk=', 'Server': 'cloudflare-nginx', 'Cf-Ray': '34686436dbee23a8-IAD')>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed response
client_response: <ClientResponse(wss://chat3-dal.beam.pro:443) [101 Switching Protocols]>
<CIMultiDictProxy('Date': 'Tue, 28 Mar 2017 06:04:21 GMT', 'Connection': 'upgrade', 'Set-Cookie': '__cfduid=d7adeb860485d9fb833dad6ab2e0a2d741490681061; expires=Wed, 28-Mar-18 06:04:21 GMT; path=/; domain=.beam.pro; HttpOnly', 'Upgrade': 'websocket', 'Sec-Websocket-Accept': 'XHnsvZWAmsOJ7KYB9A0Pd2W3csQ=', 'Server': 'cloudflare-nginx', 'Cf-Ray': '346864389c640862-IAD')>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Task was destroyed but it is pending!
task: <Task pending coro=<WebSocket.read() running at /home/user/Documents/Cactus/CactusBot/cactusbot/services/websocket.py:69> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f523b97fa38>()]>>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Unclosed response
client_response: <ClientResponse(wss://cactus.exoz.one/sepal) [101 Switching Protocols]>
<CIMultiDictProxy('Date': 'Tue, 28 Mar 2017 06:04:20 GMT', 'Connection': 'upgrade', 'Set-Cookie': '__cfduid=daf67f7da4e5c439932bae81c1253cba11490681060; expires=Wed, 28-Mar-18 06:04:20 GMT; path=/; domain=.exoz.one; HttpOnly', 'Upgrade': 'websocket', 'Sec-Websocket-Accept': 'JHb+d4wWSFSms4OngQ8ldcoLQio=', 'Server': 'cloudflare-nginx', 'Cf-Ray': '34686431496a0f2d-IAD')>
2017-03-28 02:04:24 ERROR asyncio default_exception_handler: Task was destroyed but it is pending!
task: <Task pending coro=<WebSocket.read() running at /home/user/Documents/Cactus/CactusBot/cactusbot/services/websocket.py:69> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f523fa17918>()]>>
|
No longer relevant. |
How come? |
When sent a
KeyboardInterrupt
, the bot should gracefully close all websockets and display a shutdown message, rather than spewing out all sorts ofasyncio
error nonsense.The text was updated successfully, but these errors were encountered: