diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-10-23 13:30:29 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-10-23 13:30:29 -0400 |
commit | b93b2bafa56ee79fa5d70b4c15901981215fa935 (patch) | |
tree | 36e17ab04c4d34f4597c99a250be880f74fd8c2d /server.go | |
parent | 8764397b7d641450009436196f300dadbe770f1d (diff) | |
download | alps-b93b2bafa56ee79fa5d70b4c15901981215fa935.tar.gz alps-b93b2bafa56ee79fa5d70b4c15901981215fa935.zip |
Rig up dowork event queue and graceful termination
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,7 @@ import ( "sync" "time" + "git.sr.ht/~sircmpwn/dowork" "github.com/fernet/fernet-go" "github.com/labstack/echo/v4" ) @@ -24,6 +25,7 @@ type Server struct { e *echo.Echo Sessions *SessionManager Options *Options + Queue *work.Queue mutex sync.RWMutex // used for server reload plugins []Plugin @@ -66,6 +68,7 @@ func newServer(e *echo.Echo, options *Options) (*Server, error) { } s.Sessions = newSessionManager(s.dialIMAP, s.dialSMTP, e.Logger, options.Debug) + s.Queue = work.NewQueue("alps") return s, nil } |