Skip to content
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

feat: queue asyncio.Task(s) consumers supervision or handle broad except #476

Closed
viniarck opened this issue May 23, 2024 · 1 comment
Closed
Assignees
Labels
future_release Planned for the next release priority_medium Medium priority

Comments

@viniarck
Copy link
Member

viniarck commented May 23, 2024

Related to issue #475:

kytos $> controller._tasks
Out[163]:
[<Task pending name='Task-3' coro=<Controller.start_controller.<locals>._run_api_server_thread() running at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:346> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7faf03e4cd90>()]> cb=[Controller.start_controller.<locals>._stop_loop() at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:329]>,
 <Task finished name='Task-4' coro=<Controller.event_handler() done, defined at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:583> exception=AttributeError("'tuple' object has no attribute 'close'")>,
 <Task pending name='Task-5' coro=<Controller.event_handler() running at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:588> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fb03c079a30>()]>>,
 <Task pending name='Task-6' coro=<Controller.event_handler() running at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:588> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7faf1e7534f0>()]>>,
 <Task finished name='Task-7' coro=<Controller.msg_out_event_handler() done, defined at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:607> exception=DeprecationWarning("Using sendall() method on sockets returned from get_extra_info('socket') will be prohibited in asyncio 3.9. Please report your use case to bugs.python.org.")>,
 <Task pending name='Task-8' coro=<Controller.event_handler() running at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:588> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7faedb48e1c0>()]>>]

These tasks are critical for core functionality so, they shouldn't crash and gets finished. Ideally, there should be a handle broad exc support here while logging the traceback and/or supervision of the task (trying to be as reliable with what's possible in Python land)

@viniarck viniarck added priority_medium Medium priority future_release Planned for the next release labels May 23, 2024
@viniarck viniarck self-assigned this Sep 18, 2024
@viniarck
Copy link
Member Author

Landed on #485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future_release Planned for the next release priority_medium Medium priority
Projects
None yet
Development

No branches or pull requests

1 participant