GitHub user perry2of5 created a discussion: end_date not set on ti in task
success callback
I'm trying to use notifiers to publish messages for task start/success/failure
to SQS. I can't seem to get the task end_date on success messages.
```
task_succeeded_sqs = send_sqs_notification(
aws_conn_id=AWS_CONN_ID,
queue_url=SQS_QUEUE_URL,
message_body='{{ {'
'"event_type": "task_succeeded", '
'"dag_id": (dag.dag_id | default("")), '
'"run_id": (((dag_run.run_id) | default("")) if dag_run else
""), '
'"task_id": ((ti.task_id | default("")) if ti else ""), '
'"started_at": (((ti.start_date | default("") | string)) if
(ti and ti.start_date) else ""), '
'"finished_at": (((ti.end_date | default("") | string)) if (ti
and ti.end_date) else "") '
'} | tojson }}',
message_group_id='{{ dag.dag_id | default("") }}',
```
I get a message back like this:
```
{
"event_type": "task_succeeded",
"dag_id": "dag-zz-test-workflow-notifications",
"run_id": "manual__2025-10-22T19:47:08.616950+00:00",
"task_id": "test-task-notif",
"started_at": "2025-10-22 19:48:13.820299+00:00",
"finished_at": ""
}
```
Is it possible the callback is fired before the end_date is set on the
task_instance? Or am I doing something stupid.
GitHub link: https://github.com/apache/airflow/discussions/57109
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]