mirror of
https://github.com/JustKato/FreePad.git
synced 2026-02-23 15:50:46 +02:00
+ Experimenting with Tasks
This commit is contained in:
22
lib/controllers/controllers_taskmanager.go
Normal file
22
lib/controllers/controllers_taskmanager.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func TaskManager() {
|
||||
|
||||
// Run the migrations function
|
||||
go handleMigrations()
|
||||
|
||||
for range time.Tick(time.Second * 5) {
|
||||
// fmt.Printf("%s\n", time.Now().Format("02/01/2006 03:04 PM"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func handleMigrations() {
|
||||
time.AfterFunc(time.Second*30, func() {
|
||||
// Run Migrations
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user