on admin index page, show number of messages in queue next to link to the queue list

This commit is contained in:
Mechiel Lukkien
2023-02-08 19:42:21 +01:00
parent 2154392bd8
commit 8bdca09b7b
4 changed files with 30 additions and 2 deletions

View File

@ -162,6 +162,11 @@ func List() ([]Msg, error) {
return qmsgs, nil
}
// Count returns the number of messages in the delivery queue.
func Count() (int, error) {
return bstore.QueryDB[Msg](queueDB).Count()
}
// Add a new message to the queue. The queue is kicked immediately to start a
// first delivery attempt.
//