additional work on reading posts - still not quite there yet but getting closer

This commit is contained in:
2025-12-19 23:23:58 -07:00
parent 57d664dcb1
commit 80bd0e03fd
11 changed files with 325 additions and 151 deletions
+11
View File
@@ -23,6 +23,7 @@ import (
"git.erbosoft.com/amy/amsterdam/email"
"git.erbosoft.com/amy/amsterdam/htmlcheck"
"git.erbosoft.com/amy/amsterdam/ui"
"git.erbosoft.com/amy/amsterdam/util"
"github.com/labstack/echo-contrib/session"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
@@ -102,6 +103,9 @@ func setupEcho() *echo.Echo {
return e
}
// ampool is the worker pool for one-shot background tasks.
var ampool *util.WorkerPool
// main is Ye Olde Main Function.
func main() {
// Configure the system.
@@ -127,6 +131,13 @@ func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()
// Set up ampool.
ampool = util.AmNewPool(ctx, 4, 128)
go func() {
<-ctx.Done()
ampool.Shutdown()
}()
// Start server
go func() {
if err := e.Start(":1323"); err != nil && err != http.ErrServerClosed {