0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-11-18 07:40:53 +01:00
This commit is contained in:
Neil Alexander 2020-12-04 17:22:58 +00:00
parent 51f18cb001
commit e0fde0c24e
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -171,7 +171,6 @@ func (oq *destinationQueue) getPendingFromDatabase() {
// in the database.
ctx := context.Background()
if pduCapacity := maxPDUsInMemory - len(oq.pendingPDUs); pduCapacity > 0 {
logrus.Infof("Retrieving up to %d pending PDUs from the database for %q", pduCapacity, oq.destination)
if pdus, err := oq.db.GetPendingPDUs(ctx, oq.destination, pduCapacity); err == nil {
for receipt, pdu := range pdus {
oq.pendingPDUs = append(oq.pendingPDUs, &queuedPDU{receipt, pdu})
@ -181,7 +180,6 @@ func (oq *destinationQueue) getPendingFromDatabase() {
}
}
if eduCapacity := maxPDUsInMemory - len(oq.pendingPDUs); eduCapacity > 0 {
logrus.Infof("Retrieving up to %d pending EDUs from the database for %q", eduCapacity, oq.destination)
if edus, err := oq.db.GetPendingEDUs(ctx, oq.destination, eduCapacity); err == nil {
for receipt, edu := range edus {
oq.pendingEDUs = append(oq.pendingEDUs, &queuedEDU{receipt, edu})