fixed unhandled panic and wrapped all internal goroutines

This commit is contained in:
Gani Georgiev committed 2026-07-15 13:41:10 +03:00
1 parent a6deb6ab90
commit 30b4184305
11 files changed
+76 -22

No files matched your search

+4 -2
View File
@@ -13,6 +13,8 @@ import (
"fmt"
"sync"
"time"
"github.com/pocketbase/pocketbase/tools/routine"
)
type job struct {
@@ -170,7 +172,7 @@ func (c *Cron) Start() {
c.runDue(time.Now())
// run after each tick
go func() {
routine.FireAndForget(func() {
for {
select {
case <-c.tickerDone:
@@ -179,7 +181,7 @@ func (c *Cron) Start() {
c.runDue(t)
}
}
}()
})
})
c.Unlock()
}