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:
parent
5a715cc60a
commit
4fba93e834
1546
plugins/jsvm/internal/types/generated/types.d.ts
vendored
1546
plugins/jsvm/internal/types/generated/types.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user