예제 #1
0
 def validate_execution_delta(self, attribute, value):
     """Check that execution_delta is in a valid timedelta format."""
     if value is not None and not is_timedelta_string(value):
         raise ValueError(
             f"Invalid timedelta definition for {attribute}: {value}."
             "Timedeltas should be specified like: 1h, 30m, 1h15m, 1d4h45m, ..."
         )
예제 #2
0
파일: dag.py 프로젝트: Iinh/bigquery-etl
 def validate_retry_delay(self, attribute, value):
     """Check that retry_delay is in a valid timedelta format."""
     if not is_timedelta_string(value):
         raise ValueError(
             f"Invalid timedelta definition for {attribute}: {value}."
             "Timedeltas should be specified like: 1h, 30m, 1h15m, 1d4h45m, ..."
         )