File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
sqlmesh/core/engine_adapter Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -189,8 +189,17 @@ def query_factory() -> Query:
189
189
def close (self ) -> t .Any :
190
190
# Cancel all pending query jobs to avoid them becoming orphan, e.g., due to interrupts
191
191
for query_job in self ._query_jobs :
192
- if not self ._db_call (query_job .done ):
193
- self ._db_call (query_job .cancel )
192
+ try :
193
+ if not self ._db_call (query_job .done ):
194
+ self ._db_call (query_job .cancel )
195
+ except Exception as ex :
196
+ logger .debug (
197
+ "Failed to cancel BigQuery job: https://console.cloud.google.com/bigquery?project=%s&j=bq:%s:%s. %s" ,
198
+ self ._query_job .project ,
199
+ self ._query_job .location ,
200
+ self ._query_job .job_id ,
201
+ str (ex ),
202
+ )
194
203
195
204
self ._query_jobs .clear ()
196
205
return super ().close ()
You can’t perform that action at this time.
0 commit comments