raphaelauv commented on PR #43893:
URL: https://github.com/apache/airflow/pull/43893#issuecomment-2469341673
do you plan to make `runner` mode customizable at task level ( like executor
) ?
cause I have multiple `operational` pythonoperator that manage heavy
database operations like this
```python
def clear_dag_runs(dag_id, status_to_clear):
context = get_current_context()
session = settings.Session()
query = session.query(DagRun).filter(
DagRun.state == status_to_clear, DagRun.dag_id == dag_id)
rst = query.all()
dag_bag = DagBag(dag_folder=path.join(SRC_FOLDER, 'dags'),
include_examples=False)
dag: DAG = dag_bag.get_dag(dag_id, session)
for dag_run in rst:
dag.clear(
start_date=dag_run.logical_date,
end_date=dag_run.logical_date,
task_ids=None,
include_subdags=True,
include_parentdag=True,
only_failed=False,
)
session.close()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]