(job: fuota::FuotaDeploymentJob)
| 26 | |
| 27 | impl Flow { |
| 28 | pub async fn handle_job(job: fuota::FuotaDeploymentJob) -> Result<()> { |
| 29 | let conf = config::get(); |
| 30 | |
| 31 | let fuota_deployment = fuota::get_deployment(job.fuota_deployment_id.into()).await?; |
| 32 | let device_profile = |
| 33 | device_profile::get(&fuota_deployment.device_profile_id.into()).await?; |
| 34 | |
| 35 | let mut flow = Flow { |
| 36 | job, |
| 37 | fuota_deployment, |
| 38 | device_profile, |
| 39 | scheduler_interval: conf.network.scheduler.interval, |
| 40 | }; |
| 41 | flow.dispatch().await |
| 42 | } |
| 43 | |
| 44 | async fn dispatch(&mut self) -> Result<()> { |
| 45 | let resp = match self.job.job { |
nothing calls this directly
no test coverage detected