mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-28 20:56:03 +00:00
domaininfo: Do not reload the database periodically
It is not expected that the user modifies the domaininfo database behind chasquid's back, and reloading it can be somewhat expensive. So this patch removes the periodic reload, and instead makes it triggered by SIGHUP so the user can trigger a reload manually if needed.
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"blitiri.com.ar/go/chasquid/internal/aliases"
|
||||
"blitiri.com.ar/go/chasquid/internal/domaininfo"
|
||||
"blitiri.com.ar/go/chasquid/internal/maillog"
|
||||
"blitiri.com.ar/go/chasquid/internal/testlib"
|
||||
"blitiri.com.ar/go/chasquid/internal/userdb"
|
||||
@@ -593,7 +594,13 @@ func realMain(m *testing.M) int {
|
||||
s.AddAddr(submissionTLSAddr, ModeSubmissionTLS)
|
||||
|
||||
s.InitQueue(tmpDir+"/queue", localC, remoteC)
|
||||
s.InitDomainInfo(tmpDir + "/domaininfo")
|
||||
|
||||
dinfo, err := domaininfo.New(tmpDir + "/domaininfo")
|
||||
if err != nil {
|
||||
fmt.Printf("Error initializing domaininfo: %v", err)
|
||||
return 1
|
||||
}
|
||||
s.SetDomainInfo(dinfo)
|
||||
|
||||
udb := userdb.New("/dev/null")
|
||||
udb.AddUser("testuser", "testpasswd")
|
||||
|
||||
Reference in New Issue
Block a user