aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-06-20 18:35:50 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-06-20 18:35:50 +0200
commit4e5b2d9dfd9413ce084e64e048a57ad6e23356d3 (patch)
tree674754d58838a219871304fd8fc57b44d2193160 /routes
parenta4cd5de795926537318f94aa34c9f2579c29fc11 (diff)
downloadmdir-4e5b2d9dfd9413ce084e64e048a57ad6e23356d3.tar.gz
mdir-4e5b2d9dfd9413ce084e64e048a57ad6e23356d3.tar.bz2
mdir-4e5b2d9dfd9413ce084e64e048a57ad6e23356d3.zip
ref: Remove model dependency fom worker
It was a bit weird to have that dependency in first place.
Diffstat (limited to 'routes')
-rw-r--r--routes/routes.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/routes.go b/routes/routes.go
index 79264c5..31384a7 100644
--- a/routes/routes.go
+++ b/routes/routes.go
@@ -10,15 +10,15 @@ import (
func HandleRequests() {
models := db.EntryModel{DB: db.DB}
- worker := worker.Worker{}
-
- worker.StartWorker(models)
+ worker := worker.NewWorkder()
env := &controller.Env{
Entries: models,
Worker: worker,
}
+ env.StartScheduler()
+
r := gin.Default()
r.LoadHTMLGlob("templates/*")
r.Static("/assets", "./assets")