summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorLizzy Hunt <lizzy.hunt@usu.edu>2024-03-27 15:10:39 -0600
committerLizzy Hunt <lizzy.hunt@usu.edu>2024-03-27 15:10:39 -0600
commit97efd2a3740412ec78a018da4fe068c141c9d1ec (patch)
tree73904689d6c69898bd834533d33b65106b14ce3e /main.go
parent0dc2679005e70c50024bc49e750f3998a0c4c24b (diff)
downloadhatecomputers.club-97efd2a3740412ec78a018da4fe068c141c9d1ec.tar.gz
hatecomputers.club-97efd2a3740412ec78a018da4fe068c141c9d1ec.zip
clean up old sessions every 500 seconds
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
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()