(
state_ref: &StateRef,
senders: &Senders,
job_description: JobDescription,
)
| 500 | } |
| 501 | |
| 502 | pub(crate) fn handle_open_job( |
| 503 | state_ref: &StateRef, |
| 504 | senders: &Senders, |
| 505 | job_description: JobDescription, |
| 506 | ) -> ToClientMessage { |
| 507 | let job_id = state_ref.get_mut().new_job_id(); |
| 508 | senders |
| 509 | .events |
| 510 | .on_job_opened(job_id, job_description.clone()); |
| 511 | let job = Job::new(job_id, job_description, true); |
| 512 | state_ref.get_mut().add_job(job); |
| 513 | ToClientMessage::OpenJobResponse(OpenJobResponse { job_id }) |
| 514 | } |
| 515 | |
| 516 | #[cfg(test)] |
| 517 | mod tests { |
no test coverage detected