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:
189189 def close (self ) -> t .Any :
190190 # Cancel all pending query jobs to avoid them becoming orphan, e.g., due to interrupts
191191 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+ )
194203
195204 self ._query_jobs .clear ()
196205 return super ().close ()
You can’t perform that action at this time.
0 commit comments