Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit a45c2eb

Browse files
authored
Merge pull request #552 from PrimeIntellect-ai/fix/migration-only-on-processor
imp(orchestrator): restrict redis migrations to processor
1 parent af6036c commit a45c2eb

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

crates/orchestrator/src/main.rs

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ async fn main() -> Result<()> {
223223

224224
// Run one-time migration for inactive nodes
225225
let migration_store_context = store_context.clone();
226-
run_inactive_node_metric_migration(migration_store_context).await?;
226+
if matches!(server_mode, ServerMode::ProcessorOnly | ServerMode::Full) {
227+
run_inactive_node_metric_migration(migration_store_context).await?;
228+
}
227229

228230
let p2p_client = Arc::new(P2PClient::new(wallet.clone()).await.unwrap());
229231

@@ -307,20 +309,22 @@ async fn main() -> Result<()> {
307309
);
308310

309311
// Run groups index migration on startup
310-
match group_plugin.migrate_groups_index().await {
311-
Ok(count) => {
312-
if count > 0 {
313-
info!(
314-
"Groups index migration completed: {} groups migrated",
315-
count
316-
);
317-
} else {
318-
info!("Groups index migration: no groups to migrate");
312+
if matches!(server_mode, ServerMode::ProcessorOnly | ServerMode::Full) {
313+
match group_plugin.migrate_groups_index().await {
314+
Ok(count) => {
315+
if count > 0 {
316+
info!(
317+
"Groups index migration completed: {} groups migrated",
318+
count
319+
);
320+
} else {
321+
info!("Groups index migration: no groups to migrate");
322+
}
323+
}
324+
Err(e) => {
325+
error!("Groups index migration failed: {}", e);
326+
return Err(e);
319327
}
320-
}
321-
Err(e) => {
322-
error!("Groups index migration failed: {}", e);
323-
return Err(e);
324328
}
325329
}
326330

0 commit comments

Comments
 (0)