mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-01-07 08:56:54 +02:00
renamed variable name
This commit is contained in:
parent
9254ce46eb
commit
b33ad36f64
@ -105,7 +105,7 @@ func hooksBinds(app core.App, loader *goja.Runtime, executors *vmsPool) {
|
||||
func cronBinds(app core.App, loader *goja.Runtime, executors *vmsPool) {
|
||||
scheduler := cron.New()
|
||||
|
||||
var hasServeInited bool
|
||||
var wasServeTriggered bool
|
||||
|
||||
loader.Set("cronAdd", func(jobId, cronExpr, handler string) {
|
||||
pr := goja.MustCompile("", "{("+handler+").apply(undefined)}", true)
|
||||
@ -121,7 +121,7 @@ func cronBinds(app core.App, loader *goja.Runtime, executors *vmsPool) {
|
||||
}
|
||||
|
||||
// start the ticker (if not already)
|
||||
if hasServeInited && scheduler.Total() > 0 && !scheduler.HasStarted() {
|
||||
if wasServeTriggered && scheduler.Total() > 0 && !scheduler.HasStarted() {
|
||||
scheduler.Start()
|
||||
}
|
||||
})
|
||||
@ -141,7 +141,7 @@ func cronBinds(app core.App, loader *goja.Runtime, executors *vmsPool) {
|
||||
scheduler.Start()
|
||||
}
|
||||
|
||||
hasServeInited = true
|
||||
wasServeTriggered = true
|
||||
|
||||
return nil
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user