Skip to content

Commit ad61458

Browse files
committed
Fixes.
1 parent 4430583 commit ad61458

3 files changed

Lines changed: 463 additions & 5 deletions

File tree

crates/actions/src/actions/sync_workspace.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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",

crates/app/src/session.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)