forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make cleanup method in trigger an async one (apache#30152)
Cleanup method is called in async run_trigger and it's easy to imagine that users might want to do some async operations in it (for example make an http call). Therefore the cleanup method should be asynchronous. Related apache#30141
- Loading branch information
Showing
3 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The ``cleanup()`` method in BaseTrigger is now defined as asynchronous (following async/await) pattern. | ||
|
||
This is potentially a breaking change for any custom trigger implementations that override the ``cleanup()`` | ||
method and uses synchronous code, however using synchronous operations in cleanup was technically wrong, | ||
because the method was executed in the main loop of the Triggerer and it was introducing unnecessary delays | ||
impacting other triggers. The change is unlikely to affect any existing trigger implementations. |