Run cron init in goroutine
Some checks are pending
Tests / test (1.21.x, macos-latest) (push) Waiting to run
Tests / test (1.21.x, ubuntu-latest) (push) Waiting to run
Tests / test (1.21.x, windows-latest) (push) Waiting to run
Tests / test (1.22.x, macos-latest) (push) Waiting to run
Tests / test (1.22.x, ubuntu-latest) (push) Waiting to run
Tests / test (1.22.x, windows-latest) (push) Waiting to run
Tests / test (1.23.x, macos-latest) (push) Waiting to run
Tests / test (1.23.x, ubuntu-latest) (push) Waiting to run
Tests / test (1.23.x, windows-latest) (push) Waiting to run

Cron init blocks the server from starting until it finishes, which is
not ideal.
This commit is contained in:
Ben Busby 2025-02-26 12:38:18 -07:00
parent d15e05d39e
commit 6970db9c5b
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1

View File

@ -24,7 +24,7 @@ func main() {
}
}()
db.InitCronTasks()
go db.InitCronTasks()
signalChan := make(chan os.Signal, 1)
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)