@@ -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 ;
48+ use tonic:: codegen :: { Body , Bytes , StdError } ;
4949
50- pub async fn poll_loop < T : ' static + AsLogicalPlan , U : ' static + AsExecutionPlan > (
51- mut scheduler : SchedulerGrpcClient < Channel > ,
50+ pub async fn poll_loop < T : ' static + AsLogicalPlan , U : ' static + AsExecutionPlan , C > (
51+ mut scheduler : SchedulerGrpcClient < C > ,
5252 executor : Arc < Executor > ,
5353 codec : BallistaCodec < T , U > ,
5454 readiness : Option < OneShotSender < String > > ,
55- ) -> Result < ( ) , BallistaError > {
55+ ) -> Result < ( ) , BallistaError >
56+ where
57+ C : tonic:: client:: GrpcService < tonic:: body:: Body > ,
58+ C :: Error : Into < StdError > ,
59+ C :: ResponseBody : Body < Data = Bytes > + Send + ' static ,
60+ <C :: ResponseBody as Body >:: Error : Into < StdError > + Send ,
61+ {
5662 let executor_specification: ExecutorSpecification = executor
5763 . metadata
5864 . specification
0 commit comments