File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,11 +64,12 @@ impl GCSCache {
6464 . map_err ( |err| anyhow ! ( "gcs credential url is invalid: {err:?}" ) ) ?;
6565
6666 // For TaskCluster integration, fetch token directly and provide it to OpenDAL
67- let token = tokio:: task:: block_in_place ( || {
68- tokio:: runtime:: Handle :: current ( )
69- . block_on ( fetch_taskcluster_token ( cred_url, rw_to_scope ( rw_mode) ) )
70- } )
71- . map_err ( |e| anyhow ! ( "Failed to fetch TaskCluster token: {e}" ) ) ?;
67+ let token = tokio:: runtime:: Builder :: new_current_thread ( )
68+ . enable_all ( )
69+ . build ( )
70+ . map_err ( |e| anyhow ! ( "Failed to create runtime for token fetch: {e}" ) ) ?
71+ . block_on ( fetch_taskcluster_token ( cred_url, rw_to_scope ( rw_mode) ) )
72+ . map_err ( |e| anyhow ! ( "Failed to fetch TaskCluster token: {e}" ) ) ?;
7273 builder = builder. token ( token) ;
7374 }
7475
You can’t perform that action at this time.
0 commit comments