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 infinite retries with pools #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pradhanpk
Copy link
Owner

SchedulerJob contains a set of TaskInstances called queued_tis. SchedulerJob.process_events loops through queued_tis and tries to remove completed tasks. However, without customizing __eq__ and __hash__, the following two lines have no effect, never removing elements from queued_tis leading to infinite retries on failure. This is related to my comment on apache#216. The following code was introduced in the fix to apache#1225.

elif ti in self.queued_tis:
    self.queued_tis.remove(ti)

`SchedulerJob` contains a `set` of `TaskInstance`s called `queued_tis`. `SchedulerJob.process_events` loops through `queued_tis` and tries to remove completed tasks. However, without customizing `__eq__` and `__hash__`, the following two lines have no effect, never removing elements from `queued_tis` leading to infinite retries on failure. This is related to my comment on apache#216. The following code was introduced in the fix to apache#1225.

```
elif ti in self.queued_tis:
    self.queued_tis.remove(ti)
````
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.

1 participant