Hydrate destination queues at startup (#1179)

* Hydrate destination queues at startup

* Review comments
This commit is contained in:
Neil Alexander 2020-07-03 11:49:49 +01:00 committed by GitHub
parent 9dffeb9b67
commit 1773fd84b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 89 additions and 1 deletions

View file

@ -270,3 +270,11 @@ func (d *Database) GetPendingPDUCount(
) (int64, error) {
return d.selectQueuePDUCount(ctx, nil, serverName)
}
// GetPendingServerNames returns the server names that have PDUs
// waiting to be sent.
func (d *Database) GetPendingServerNames(
ctx context.Context,
) ([]gomatrixserverlib.ServerName, error) {
return d.selectQueueServerNames(ctx, nil)
}