Skip to content

Commit

Permalink
fix docstring and signature
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Mar 24, 2022
1 parent bd2e71d commit 6847f4d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions astronomer/providers/cncf/kubernetes/operators/kubernetes_pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ def raise_for_trigger_status(event: Dict[str, Any]) -> None:
else:
raise AirflowException(description)

def defer(self, last_log_time=None):
def defer(self, last_log_time=None, **kwargs):
"""Defers to WaitContainerTrigger optionally with last log time."""
if kwargs:
raise ValueError(
f"Received keyword arguments {list(kwargs.keys())} but "
f"they are not used in this implementation of `defer`."
)
super().defer(
trigger=WaitContainerTrigger(
kubernetes_conn_id=None,
Expand Down Expand Up @@ -83,13 +88,11 @@ def trigger_reentry(self, context: Context, event: Dict[str, Any]) -> Any:
"""
Point of re-entry from trigger.
If `logging_interval` is not None, the trigger will periodically resume with this method, and
this method will get the latest
Relies on trigger to throw an exception, otherwise it assumes execution was
successful.
If ``logging_interval`` is None, then at this point the pod should be done and we'll just fetch
the logs and exit.
If ``logging_interval`` is not None, it could be that the pod is still running and we'll just
grab the latest logs and defer back to the trigger again.
"""
remote_pod = None
try:
Expand Down

0 comments on commit 6847f4d

Please sign in to comment.