File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,6 @@ pub async fn sync_workspace(
2323) -> miette:: Result < ActionStatus > {
2424 let _lock = app_context. cache_engine . create_lock ( action. get_prefix ( ) ) ?;
2525
26- // Connect to the remote service in this action,
27- // as it always runs before tasks, and we don't need it
28- // for non-pipeline related features!
29- app_context. cache_engine . storage . connect_backends ( ) . await ?;
30-
3126 if should_skip_action ( "MOON_SKIP_SYNC_WORKSPACE" ) . is_some ( ) {
3227 debug ! (
3328 "Skipping workspace sync because {} is set" ,
Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ impl MoonSession {
335335 | Commands :: Exec ( _)
336336 | Commands :: Run ( _)
337337 | Commands :: Sync { .. }
338+ | Commands :: Daemon { .. }
338339 )
339340 }
340341
@@ -467,6 +468,9 @@ impl AppSession for MoonSession {
467468
468469 // This function runs in an async task (background thread)
469470 async fn execute ( & mut self ) -> AppResult < Self :: Error > {
471+ // Connect to the storage backends as early as possible
472+ self . get_cache_engine ( ) ?. storage . connect_backends ( ) . await ?;
473+
470474 // Check for a new version and log to the console
471475 if self . is_telemetry_enabled ( ) && self . is_pipeline_command ( ) {
472476 execute:: check_for_new_version ( & self , & self . toolchains_config . moon . manifest_url )
You can’t perform that action at this time.
0 commit comments