MCPcopy Create free account
hub / github.com/elastic/devfiler / monitor_executables

Function monitor_executables

src/symbolizer/mod.rs:58–79  ·  view source on GitHub ↗
(symb_endpoint: String)

Source from the content-addressed store, hash-verified

56/// in the corresponding symbols from global infra.
57#[cfg(feature = "automagic-symbols")]
58pub 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"))]
82pub async fn monitor_executables() -> Result<()> {

Callers 1

mainFunction · 0.85

Calls 4

ingest_task_controllerFunction · 0.85
iterMethod · 0.80
readMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected