File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
airflow/providers/google/cloud Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ def get_batch_client(
277
277
credentials = self ._get_credentials (), client_info = self .client_info , client_options = client_options
278
278
)
279
279
280
- def wait_for_operation (self , timeout : float , operation : Operation ):
280
+ def wait_for_operation (self , operation : Operation , timeout : Optional [ float ] = None ):
281
281
"""Waits for long-lasting operation to complete."""
282
282
try :
283
283
return operation .result (timeout = timeout )
Original file line number Diff line number Diff line change @@ -2101,9 +2101,7 @@ def execute(self, context: 'Context'):
2101
2101
timeout = self .timeout ,
2102
2102
metadata = self .metadata ,
2103
2103
)
2104
- if self .timeout is None :
2105
- raise AirflowException ('Timeout should be set here' )
2106
- result = hook .wait_for_operation (self .timeout , self .operation )
2104
+ result = hook .wait_for_operation (timeout = self .timeout , operation = self .operation )
2107
2105
self .log .info ("Batch %s created" , self .batch_id )
2108
2106
except AlreadyExists :
2109
2107
self .log .info ("Batch with given id already exists" )
You canβt perform that action at this time.
0 commit comments