From 97efd2a3740412ec78a018da4fe068c141c9d1ec Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Wed, 27 Mar 2024 15:10:39 -0600 Subject: clean up old sessions every 500 seconds --- main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index afa9289..4b92b1b 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "git.hatecomputers.club/hatecomputers/hatecomputers.club/api" "git.hatecomputers.club/hatecomputers/hatecomputers.club/args" "git.hatecomputers.club/hatecomputers/hatecomputers.club/database" + "git.hatecomputers.club/hatecomputers/hatecomputers.club/scheduler" "github.com/joho/godotenv" ) @@ -33,6 +34,10 @@ func main() { log.Println("database migrated successfully") } + if argv.Scheduler { + scheduler.StartScheduler(dbConn) + } + if argv.Server { server := api.MakeServer(argv, dbConn) err = server.ListenAndServe() -- cgit v1.2.3-70-g09d2