Skip to content

Commit c0bfc95

Browse files
committed
fix: add unix config for windows to be able to compile
1 parent 9e51826 commit c0bfc95

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

crates/base/src/runner.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{
55
};
66
use code0_flow::flow_service::FlowUpdateService;
77
use std::sync::Arc;
8-
use tokio::signal::{self, unix::SignalKind, unix::signal};
8+
use tokio::signal::{self};
99
use tonic::transport::Server;
1010
use tonic_health::pb::health_server::HealthServer;
1111

@@ -96,12 +96,18 @@ impl<C: LoadConfig> ServerRunner<C> {
9696
server.init(&context).await?;
9797
log::info!("Draco successfully initialized.");
9898

99+
#[cfg(unix)]
99100
let sigterm = async {
101+
use tokio::signal::unix::{SignalKind, signal};
102+
100103
let mut term =
101104
signal(SignalKind::terminate()).expect("failed to install SIGTERM handler");
102105
term.recv().await;
103106
};
104107

108+
#[cfg(not(unix))]
109+
let sigterm = std::future::pending::<()>();
110+
105111
match health_task {
106112
Some(mut ht) => {
107113
tokio::select! {

0 commit comments

Comments
 (0)