diff --git a/gcloud/taskflow3/domains/callback.py b/gcloud/taskflow3/domains/callback.py index 043b829669..f0be82d739 100644 --- a/gcloud/taskflow3/domains/callback.py +++ b/gcloud/taskflow3/domains/callback.py @@ -22,7 +22,7 @@ from requests import HTTPError from gcloud.taskflow3.domains.dispatchers import NodeCommandDispatcher -from gcloud.taskflow3.models import TaskCallBackRecord, TaskFlowRelation +from gcloud.taskflow3.models import TaskCallBackRecord, TaskFlowInstance, TaskFlowRelation from gcloud.utils.redis_lock import redis_lock logger = logging.getLogger("root") @@ -98,7 +98,10 @@ def _url_callback(self): url = self.record.url response = None try: - response = requests.post(url, data=self.extra_info) + task = TaskFlowInstance.objects.get(id=self.task_id) + data = task.get_task_detail() + self.extra_info["outputs"] = data["outputs"] + response = requests.post(url, json=self.extra_info) response.raise_for_status() except HTTPError as e: message = (