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

Fix watchdog & scheduler #1757

Merged
merged 4 commits into from May 28, 2020
Merged

Fix watchdog & scheduler #1757

merged 4 commits into from May 28, 2020

Conversation

pvizeli
Copy link
Member

@pvizeli pvizeli commented May 28, 2020

No description provided.

supervisor/misc/scheduler.py Outdated Show resolved Hide resolved
if not self.suspend:
self.loop.create_task(data[CALL]())
if self.sys_core.state == CoreStates.RUNNING:
self.sys_loop.create_task(data[CALL]())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the context unspecific here, so we need to specify what loop to use when creating the task, ie use loop.create_task instead of asyncio.create_task?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's sys_create_task. asyncio.create_task has more overhead which we can avoid anyway with our structure they we created before with python 3.4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. In the long run I think it's wise to try to move to the recommended higher level APIs. This is a trend in asyncio.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I wait for executor/callback pool to have a high-level API and we can migrate once all to it. maybe with Python 4 - anyway there are ~53 bigger tasks on ClickUp

pvizeli and others added 3 commits May 28, 2020 14:10
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (with my limited insight in the library)!

@pvizeli pvizeli merged commit 7bd6ff3 into dev May 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-watchdog-scheduler branch May 28, 2020 12:25
@lock lock bot locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants