pub fn schedule_tasks(
        &self,
        real_timer: RealTimer,
        tokio_handle: Handle,
    ) -> Result<SchedulerHandle, SchedulerError> {
        let (stopper, _) = broadcast::channel::<()>(1);
        let tasks: Vec<Arc<Task>> = self.tasks.iter().map(|t| Arc::new(t.to_owned())).collect();

        for task in tasks {
            info!("Scheduling task '{}'", &task.app.name);
            tokio_handle.spawn(task.schedule(real_timer.clone(), stopper.subscribe()));
        }

        Ok(SchedulerHandle { stopper })
    }
// Schedules the tasks contained in this task list
Schedules the tasks contained in this task list
Schedules the tasks contained in this task list
pub fn schedule_tasks(
        &self,
        real_timer: RealTimer,
        tokio_handle: Handle,
    ) -> Result<SchedulerHandle, SchedulerError> {
        let (stopper, _) = broadcast::channel::<()>(1);
        let tasks: Vec<Arc<Task>> = self.tasks.iter().map(|t| Arc::new(t.to_owned())).collect();
        for task in tasks {
            info!("Scheduling task '{}'", &task.app.name);
            tokio_handle.spawn(task.schedule(real_timer.clone(), stopper.subscribe()));
        }
        Ok(SchedulerHandle { stopper })
    }
pub fn schedule_tasks ( & self , real_timer : RealTimer , tokio_handle : Handle , ) -> Result < SchedulerHandle , SchedulerError > { let ( stopper , _ ) = broadcast :: channel :: < ( ) > ( 1 ) ; let tasks : Vec < Arc < Task > > = self . tasks . iter ( ) . map ( | t | Arc :: new ( t . to_owned ( ) ) ) . collect ( ) ; for task in tasks { info ! ( " " task app name ) ; tokio_handle . spawn ( task . schedule ( real_timer . clone ( ) , stopper . subscribe ( ) ) ) ; } Ok ( SchedulerHandle { stopper } ) }
Schedules the tasks contained in this task list
Schedules the tasks contained in this task list
&self
real_timer
RealTimer
tokio_handle
Handle
&self
real_timer
RealTimer
tokio_handle
Handle