MCPcopy Create free account
hub / github.com/daodst/chat / wakeQueueIfNeeded

Method wakeQueueIfNeeded

federationapi/queue/destinationqueue.go:163–173  ·  view source on GitHub ↗

wakeQueueIfNeeded will wake up the destination queue if it is not already running. If it is running but it is backing off then we will interrupt the backoff, causing any federation requests to retry.

()

Source from the content-addressed store, hash-verified

161// then we will interrupt the backoff, causing any federation
162// requests to retry.
163func (oq *destinationQueue) wakeQueueIfNeeded() {
164 // If we are backing off then interrupt the backoff.
165 if oq.backingOff.CAS(true, false) {
166 oq.interruptBackoff <- true
167 }
168 // If we aren't running then wake up the queue.
169 if !oq.running.Load() {
170 // Start the queue.
171 go oq.backgroundSend()
172 }
173}
174
175// getPendingFromDatabase will look at the database and see if
176// there are any persisted events that haven't been sent to this

Callers 3

sendEventMethod · 0.95
sendEDUMethod · 0.95
RetryServerMethod · 0.80

Calls 2

backgroundSendMethod · 0.95
LoadMethod · 0.80

Tested by

no test coverage detected