1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-01-22 13:43:04 +02:00

regenerated jsvm types and added locks for the startTimer

This commit is contained in:
Gani Georgiev 2024-02-21 22:42:01 +02:00
parent 5a715cc60a
commit 4fba93e834
2 changed files with 774 additions and 774 deletions

File diff suppressed because it is too large Load Diff

View File

@ -157,6 +157,7 @@ func (c *Cron) Start() {
next := now.Add(c.interval).Truncate(c.interval)
delay := next.Sub(now)
c.Lock()
c.startTimer = time.AfterFunc(delay, func() {
c.Lock()
c.ticker = time.NewTicker(c.interval)
@ -172,6 +173,7 @@ func (c *Cron) Start() {
}
}()
})
c.Unlock()
}
// HasStarted checks whether the current Cron ticker has been started.