mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:14:39 +03:00
add debug logging about bstore db schema upgrades
bstore was updated to v0.0.6 to add this logging. this simplifies some of the db-handling code in mtastsdb,tlsrptdb,dmarcdb. we now call the package-level Init() and Close() in all tests properly.
This commit is contained in:
12
serve.go
12
serve.go
@ -71,11 +71,15 @@ func start(mtastsdbRefresher, sendDMARCReports, sendTLSReports, skipForkExec boo
|
||||
}
|
||||
|
||||
if err := mtastsdb.Init(mtastsdbRefresher); err != nil {
|
||||
return fmt.Errorf("mtasts init: %s", err)
|
||||
return fmt.Errorf("mtastsdb init: %s", err)
|
||||
}
|
||||
|
||||
if err := tlsrptdb.Init(); err != nil {
|
||||
return fmt.Errorf("tlsrpt init: %s", err)
|
||||
return fmt.Errorf("tlsrptdb init: %s", err)
|
||||
}
|
||||
|
||||
if err := dmarcdb.Init(); err != nil {
|
||||
return fmt.Errorf("dmarcdb init: %s", err)
|
||||
}
|
||||
|
||||
done := make(chan struct{}) // Goroutines for messages and webhooks, and cleaners.
|
||||
@ -83,10 +87,6 @@ func start(mtastsdbRefresher, sendDMARCReports, sendTLSReports, skipForkExec boo
|
||||
return fmt.Errorf("queue start: %s", err)
|
||||
}
|
||||
|
||||
// dmarcdb starts after queue because it may start sending reports through the queue.
|
||||
if err := dmarcdb.Init(); err != nil {
|
||||
return fmt.Errorf("dmarc init: %s", err)
|
||||
}
|
||||
if sendDMARCReports {
|
||||
dmarcdb.Start(dns.StrictResolver{Pkg: "dmarcdb"})
|
||||
}
|
||||
|
Reference in New Issue
Block a user