(
application_id: Uuid,
vars: &HashMap<String, String>,
pl: &integration::JoinEvent,
)
| 245 | } |
| 246 | |
| 247 | async fn _join_event( |
| 248 | application_id: Uuid, |
| 249 | vars: &HashMap<String, String>, |
| 250 | pl: &integration::JoinEvent, |
| 251 | ) -> Result<()> { |
| 252 | let app_ints = for_application_id(application_id) |
| 253 | .await |
| 254 | .context("Get integrations for application")?; |
| 255 | let global_ints = GLOBAL_INTEGRATIONS.read().await; |
| 256 | let mut futures = Vec::new(); |
| 257 | |
| 258 | for (i, _) in app_ints.iter().enumerate() { |
| 259 | futures.push(app_ints[i].join_event(vars, pl)); |
| 260 | } |
| 261 | for (i, _) in global_ints.iter().enumerate() { |
| 262 | futures.push(global_ints[i].join_event(vars, pl)); |
| 263 | } |
| 264 | |
| 265 | for e in join_all(futures).await { |
| 266 | e?; |
| 267 | } |
| 268 | |
| 269 | Ok(()) |
| 270 | } |
| 271 | |
| 272 | pub async fn ack_event( |
| 273 | application_id: Uuid, |
no test coverage detected