mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Review comments
This commit is contained in:
parent
b300aaa0ed
commit
4267c6fd0a
|
|
@ -251,8 +251,10 @@ func (oq *destinationQueue) backgroundSend() {
|
|||
oq.cleanPendingInvites()
|
||||
return
|
||||
} else {
|
||||
// We haven't been told to give up terminally yet
|
||||
// but we still need to wake up the next iteration.
|
||||
// We haven't been told to give up terminally yet but we still have
|
||||
// PDUs waiting to be sent. By sending a message into the wake chan,
|
||||
// the next loop iteration will try processing these PDUs again,
|
||||
// subject to the backoff.
|
||||
oq.wakeServerCh <- true
|
||||
}
|
||||
} else if transaction {
|
||||
|
|
|
|||
|
|
@ -61,10 +61,12 @@ func NewOutgoingQueues(
|
|||
queues: map[gomatrixserverlib.ServerName]*destinationQueue{},
|
||||
}
|
||||
// Look up which servers we have pending items for and then rehydrate those queues.
|
||||
if serverNames, err := db.GetPendingServerNames(context.TODO()); err == nil {
|
||||
if serverNames, err := db.GetPendingServerNames(context.Background()); err == nil {
|
||||
for _, serverName := range serverNames {
|
||||
queues.getQueue(serverName).wakeQueueIfNeeded()
|
||||
}
|
||||
} else {
|
||||
log.WithError(err).Error("Failed to get server names for destination queue hydration")
|
||||
}
|
||||
return queues
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue