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 handling of 'forever' delay (fixes #125) #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ronnix
Copy link

@ronnix ronnix commented Sep 14, 2021

This PR builds on the work in #236 and avoids comparing strings and floats when computing the max delay.

ronnix added a commit to Delegation-numerique-en-sante/mesconseilscovid that referenced this pull request Sep 14, 2021
ronnix added a commit to Delegation-numerique-en-sante/mesconseilscovid that referenced this pull request Sep 14, 2021
ronnix added a commit to Delegation-numerique-en-sante/mesconseilscovid that referenced this pull request Sep 14, 2021
@@ -95,7 +95,7 @@ def examine(self):
if changed:
func = item['func']
delay = item['delay']
if delay and isinstance(delay, float):
if delay and isinstance(delay, float) or delay == 'forever':

Choose a reason for hiding this comment

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

Not related to this PR but seems like we should also fix isinstance(delay, float) to isinstance(10, (int, float)).
What do you think?

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