Purge old expired sessions
This commit is contained in:
parent
93b464b0ff
commit
c577facc24
3 changed files with 75 additions and 0 deletions
5
main.go
5
main.go
|
|
@ -5,9 +5,11 @@ import (
|
|||
"fmt"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"git.readonly.ch/bouzoure/pop-camarades/controllers"
|
||||
"git.readonly.ch/bouzoure/pop-camarades/helpers"
|
||||
"git.readonly.ch/bouzoure/pop-camarades/jobs"
|
||||
"git.readonly.ch/bouzoure/pop-camarades/middlewares"
|
||||
"github.com/flosch/pongo2/v6"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
|
@ -43,6 +45,9 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// RegisterJobs
|
||||
go helpers.RegisterJob(60*time.Minute, "clean saved sessions", jobs.CleanSavedSessions)
|
||||
|
||||
// Create a new engine
|
||||
var engine *django.Engine
|
||||
if config.Debug {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue