File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use crate::{
55} ;
66use code0_flow:: flow_service:: FlowUpdateService ;
77use std:: sync:: Arc ;
8- use tokio:: signal:: { self , unix :: SignalKind , unix :: signal } ;
8+ use tokio:: signal:: { self } ;
99use tonic:: transport:: Server ;
1010use 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! {
You can’t perform that action at this time.
0 commit comments