(io: SocketIo, mut receiver: Receiver<serde_json::Value>)
| 264 | } |
| 265 | |
| 266 | async fn notification_background_task(io: SocketIo, mut receiver: Receiver<serde_json::Value>) { |
| 267 | log::debug!("Background task spawned"); |
| 268 | while let Some(notification) = receiver.recv().await { |
| 269 | match io.emit("message", ¬ification).await { |
| 270 | Ok(_) => (), |
| 271 | Err(e) => log::info!("Could not emit notification from background task: {}", e), |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | fn log_error(error: String) { |
| 277 | println!( |
no test coverage detected