feat: initial Beta 1 release

- soju raw connector with event playback and CHATHISTORY fallback
- SQLite store with msgid de-dup and retention job
- Mentions + Pushover + tuning; structured JSON logs
- Summaries: concise, link-following, multi-line grouping
- HTTP: /healthz, /ready, /tail, /trigger, /metrics
- Docker: distroless, healthcheck, version metadata
- Docs: README, CHANGELOG, compose
This commit is contained in:
Thomas Cravey 2025-08-15 18:06:28 -05:00
commit 2954e85e7a
19 changed files with 1983 additions and 0 deletions

View file

@ -0,0 +1,31 @@
package scheduler
import (
"context"
"log"
"time"
"github.com/robfig/cron/v3"
)
// Start runs the cron scheduler until ctx is done.
func Start(ctx context.Context, spec string, job func(now time.Time), logger *log.Logger) error {
c := cron.New(cron.WithParser(cron.NewParser(cron.SecondOptional|cron.Minute|cron.Hour|cron.Dom|cron.Month|cron.Dow|cron.Descriptor)))
_, err := c.AddFunc(spec, func() {
job(time.Now())
})
if err != nil {
return err
}
if logger != nil {
logger.Printf("scheduler started: %s", spec)
}
c.Start()
go func() {
<-ctx.Done()
c.Stop()
}()
return nil
}