mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 00:37:13 -04:00
Make the Mirror Queue a queue (#17326)
Convert the old mirror syncing queue to the more modern queue format. Fix a bug in the from the repo-archive queue PR - the assumption was made that uniqueness could be enforced with by checking equality in a map in channel unique queues - however this only works for primitive types - which was the initial intention but is an imperfect. This is fixed by marshalling the data and placing the martialled data in the unique map instead. The documentation is also updated to add information about the deprecated configuration values. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
b9a2f263b8
commit
7117c7774a
7 changed files with 164 additions and 76 deletions
|
@ -16,7 +16,6 @@ import (
|
|||
// Mailer represents mail service.
|
||||
type Mailer struct {
|
||||
// Mailer
|
||||
QueueLength int
|
||||
Name string
|
||||
From string
|
||||
FromName string
|
||||
|
@ -54,7 +53,6 @@ func newMailService() {
|
|||
}
|
||||
|
||||
MailService = &Mailer{
|
||||
QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100),
|
||||
Name: sec.Key("NAME").MustString(AppName),
|
||||
SendAsPlainText: sec.Key("SEND_AS_PLAIN_TEXT").MustBool(false),
|
||||
MailerType: sec.Key("MAILER_TYPE").In("", []string{"smtp", "sendmail", "dummy"}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue