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

scheduler: add method to get all schedulers for smartplugin #652

Closed
wants to merge 2 commits into from

Conversation

onkelandy
Copy link
Member

e.g. to easily remove all active scheduler on stop, etc.
for scheduler in self.scheduler_get_all():
self.scheduler_remove(scheduler)

Feel free to improve/adapt the method, however I think it's convenient and useful when stopping/suspending plugins.

@Morg42
Copy link
Member

Morg42 commented Jun 13, 2024

Alternative method with smartplugin tracking its own schedulers...

Morg42@9974633

@onkelandy
Copy link
Member Author

Actually alternative is cleaner.
Maybe we could add a remove_all method to make it even easier eg for deleting schedulers on suspend/stop..?

@Morg42 Morg42 closed this Jun 14, 2024
@onkelandy onkelandy deleted the scheduler branch June 27, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants