(symb_endpoint: String)
| 56 | /// in the corresponding symbols from global infra. |
| 57 | #[cfg(feature = "automagic-symbols")] |
| 58 | pub async fn monitor_executables(symb_endpoint: String) -> Result<()> { |
| 59 | let (tx, rx) = tokio::sync::mpsc::channel(32); |
| 60 | tokio::spawn(ingest_task_controller(rx, symb_endpoint)); |
| 61 | |
| 62 | loop { |
| 63 | tokio::time::sleep(SYMB_FREQ).await; |
| 64 | let now = chrono::Utc::now().timestamp() as UtcTimestamp; |
| 65 | |
| 66 | for (file_id, meta_ref) in DB.executables.iter() { |
| 67 | match meta_ref.get().symb_status { |
| 68 | ArchivedSymbStatus::NotAttempted => {} |
| 69 | ArchivedSymbStatus::TempError { last_attempt, .. } |
| 70 | if now > last_attempt + SYMB_RETRY_FREQ.as_secs() => {} |
| 71 | _ => continue, |
| 72 | } |
| 73 | |
| 74 | if let Err(_) = tx.send((file_id, meta_ref.read())).await { |
| 75 | break; |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | #[cfg(not(feature = "automagic-symbols"))] |
| 82 | pub async fn monitor_executables() -> Result<()> { |
no test coverage detected