@@ -45,14 +45,20 @@ use std::time::{SystemTime, UNIX_EPOCH};
4545use std:: { sync:: Arc , time:: Duration } ;
4646use tokio:: sync:: oneshot:: Sender as OneShotSender ;
4747use tokio:: sync:: { OwnedSemaphorePermit , Semaphore } ;
48- use tonic:: transport:: Channel ;
4948
50- pub async fn poll_loop < T : ' static + AsLogicalPlan , U : ' static + AsExecutionPlan > (
51- mut scheduler : SchedulerGrpcClient < Channel > ,
49+ pub async fn poll_loop < T : ' static + AsLogicalPlan , U : ' static + AsExecutionPlan , C > (
50+ mut scheduler : SchedulerGrpcClient < C > ,
5251 executor : Arc < Executor > ,
5352 codec : BallistaCodec < T , U > ,
5453 readiness : Option < OneShotSender < String > > ,
55- ) -> Result < ( ) , BallistaError > {
54+ ) -> Result < ( ) , BallistaError >
55+ where
56+ C : tonic:: client:: GrpcService < tonic:: body:: Body > + Send + ' static ,
57+ C :: Error : Into < Box < dyn Error + Send + Sync > > ,
58+ C :: ResponseBody : tonic:: codegen:: Body < Data = tonic:: codegen:: Bytes > + Send + ' static ,
59+ <C :: ResponseBody as tonic:: codegen:: Body >:: Error :
60+ Into < Box < dyn Error + Send + Sync > > + Send ,
61+ {
5662 let executor_specification: ExecutorSpecification = executor
5763 . metadata
5864 . specification
0 commit comments