You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Only one step can be followed at a time, ignoring additional steps.",
470
+
"warning",
471
+
)
472
+
ifinterval<CLI_LOGS_FOLLOW_MIN_INTERVAL:
473
+
interval=CLI_LOGS_FOLLOW_DEFAULT_INTERVAL
474
+
display_message(
475
+
f"Interval should be an integer greater than or equal to {CLI_LOGS_FOLLOW_MIN_INTERVAL}, resetting to default ({CLI_LOGS_FOLLOW_DEFAULT_INTERVAL} s).",
help="Filter job logs to include only those steps that match certain filtering criteria. Use --filter name=value pairs. Available filters are compute_backend, docker_img, status and step.",
888
895
)
896
+
@click.option(
897
+
"--follow",
898
+
"follow",
899
+
is_flag=True,
900
+
default=False,
901
+
help="Follow the logs of a running workflow or job (similar to tail -f).",
902
+
)
903
+
@click.option(
904
+
"-i",
905
+
"--interval",
906
+
"interval",
907
+
default=CLI_LOGS_FOLLOW_DEFAULT_INTERVAL,
908
+
help=f"Sleep time in seconds between log polling if log following is enabled. [default={CLI_LOGS_FOLLOW_DEFAULT_INTERVAL}]",
909
+
)
889
910
@add_pagination_options
890
911
@check_connection
891
912
@click.pass_context
@@ -894,22 +915,31 @@ def workflow_logs(
894
915
workflow,
895
916
access_token,
896
917
json_format,
897
-
steps=None,
918
+
follow,
919
+
interval,
898
920
filters=None,
899
921
page=None,
900
922
size=None,
901
923
): # noqa: D301
902
924
"""Get workflow logs.
903
925
904
-
The ``logs`` command allows to retrieve logs of running workflow. Note that
905
-
only finished steps of the workflow are returned, the logs of the currently
906
-
processed step is not returned until it is finished.
926
+
The ``logs`` command allows to retrieve logs of a running workflow.
0 commit comments