Skip to content

Commit a1198d9

Browse files
committed
Only future::select
1 parent c65e2a5 commit a1198d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/operator-binary/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::sync::Arc;
22

33
use clap::{crate_description, crate_version, Parser};
4-
use futures::StreamExt;
4+
use futures::{pin_mut, StreamExt};
55
use stackable_operator::{
66
cli::{Command, ProductOperatorRun},
77
commons::authentication::AuthenticationClass,
@@ -231,9 +231,9 @@ async fn main() -> anyhow::Result<()> {
231231
},
232232
);
233233

234-
// Let's run them in parallel instead of only concurrently
235-
tokio::spawn(druid_connection_controller);
236-
superset_controller.await;
234+
pin_mut!(superset_controller, druid_connection_controller);
235+
// kube-runtime's Controller will tokio::spawn each reconciliation, so this only concerns the internal watch machinery
236+
futures::future::select(superset_controller, druid_connection_controller).await;
237237
}
238238
}
239239

0 commit comments

Comments
 (0)