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