MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / next_retry_delay

Method next_retry_delay

nodedb/src/event/trigger/retry.rs:126–135  ·  view source on GitHub ↗

Time until the next retry is due, or None if queue is empty.

(&self)

Source from the content-addressed store, hash-verified

124
125 /// Time until the next retry is due, or None if queue is empty.
126 pub fn next_retry_delay(&self) -> Option<Duration> {
127 self.queue.front().map(|e| {
128 let now = Instant::now();
129 if e.next_retry_at > now {
130 e.next_retry_at - now
131 } else {
132 Duration::ZERO
133 }
134 })
135 }
136}
137
138impl Default for TriggerRetryQueue {

Callers

nothing calls this directly

Calls 2

nowFunction · 0.85
frontMethod · 0.80

Tested by

no test coverage detected