-
Notifications
You must be signed in to change notification settings - Fork 16.4k
[AIRFLOW-234] make task that aren't running self-terminate
#1585
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
Conversation
Current coverage is 68.12%@@ master #1585 diff @@
==========================================
Files 116 119 +3
Lines 8312 8336 +24
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5653 5679 +26
+ Misses 2659 2657 -2
Partials 0 0
|
running self-terminate
airflow/jobs.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the commit? There is no change in state of any of the objects that get saved to the db
|
As promised a test for this: Please note that if #1581 lands the test needs to be updated as the state will not be set to scheduled by "process_dag" anymore, but that should not be a large change and we could even leave it to check for "None" |
472f9f4 to
f6fecef
Compare
|
@bolkedebruin I hit some issues with the mocking approach and found a way to run a task asynchronously. I think this is good to go now. |
|
👍 , rebase needed sorry! |
7e2c48e to
c2f9460
Compare
Task now poke at their own state and self terminate if they are not running. This allows users to delete task instance without leaving zombie tasks running on workers.
Task now poke at their own state and self terminate if they are not
running. This allows users to delete task instance without leaving
zombie tasks running on workers.
tested manually by running a sleeping long sleeping task and deleting its state while running, here's the log output for that task: