You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The timeout feature introduced in #104 is not getting reset properly. The code checks for a timeout in the copy of the worker dict, but this has just been deleted from there:
signal.setitimer(signal.ITIMER_REAL,
cwrk.pop("timeout"))
cwrk.pop('fun')(job, **cwrk)
if "timeout" in cwrk:
signal.alarm(0) # cancel the alarm
To Reproduce
(will add later)
# Your code here
Expected behavior
Timeout should be reset.
Actual results
Timeout is not reset, which means the next or next next plugin may be interrupted due to the earlier timeout still being active.
Environment Info:
Trollflow2 Version: main
Additional context
The problem is masked if the next plugin also uses a timeout, because setting a new signal replaces the previous one. That's why I (Gerrit) never realised the problem, but it's quite clear that it exists reading the source code.
Writing unit tests for this is a little bit tricky.
The text was updated successfully, but these errors were encountered:
Describe the bug
The timeout feature introduced in #104 is not getting reset properly. The code checks for a
timeout
in the copy of the worker dict, but this has just been deleted from there:To Reproduce
(will add later)
# Your code here
Expected behavior
Timeout should be reset.
Actual results
Timeout is not reset, which means the next or next next plugin may be interrupted due to the earlier timeout still being active.
Environment Info:
Additional context
The problem is masked if the next plugin also uses a timeout, because setting a new signal replaces the previous one. That's why I (Gerrit) never realised the problem, but it's quite clear that it exists reading the source code.
Writing unit tests for this is a little bit tricky.
The text was updated successfully, but these errors were encountered: