uranusjr commented on a change in pull request #21731:
URL: https://github.com/apache/airflow/pull/21731#discussion_r816313328
##########
File path: airflow/callbacks/callback_requests.py
##########
@@ -89,6 +126,17 @@ def __init__(
self.run_id = run_id
self.is_failure_callback = is_failure_callback
+ @classmethod
+ def from_json(cls, json_str: str):
+ json_object = json.loads(json_str)
+ return cls(
+ full_filepath=json_object["full_filepath"],
+ dag_id=json_object["dag_id"],
+ run_id=json_object["run_id"],
+ is_failure_callback=json_object["is_failure_callback"],
+ msg=json_object.get("msg", None),
+ )
Review comment:
Same here, this entire function does not need to exist at all since the
parent implementation should just work?
--
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]