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.
()
| 161 | // then we will interrupt the backoff, causing any federation |
| 162 | // requests to retry. |
| 163 | func (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 |
no test coverage detected