feat: recurring expenses and reports
This commit is contained in:
parent
cda4f61939
commit
9e6ff67a87
23 changed files with 2943 additions and 56 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"git.juancwu.dev/juancwu/budgit/internal/app"
|
||||
"git.juancwu.dev/juancwu/budgit/internal/config"
|
||||
"git.juancwu.dev/juancwu/budgit/internal/routes"
|
||||
"git.juancwu.dev/juancwu/budgit/internal/scheduler"
|
||||
)
|
||||
|
||||
// version is set at build time via -ldflags.
|
||||
|
|
@ -35,6 +36,12 @@ func main() {
|
|||
|
||||
handler := routes.SetupRoutes(a)
|
||||
|
||||
// Start recurring expense scheduler
|
||||
schedulerCtx, schedulerCancel := context.WithCancel(context.Background())
|
||||
defer schedulerCancel()
|
||||
sched := scheduler.New(a.RecurringExpenseService)
|
||||
go sched.Start(schedulerCtx)
|
||||
|
||||
// Health check bypasses all middleware
|
||||
finalHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodGet && r.URL.Path == "/healthz" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue