fixed unhandled panic and wrapped all internal goroutines

This commit is contained in:
Gani Georgiev
2026-07-15 12:03:07 +03:00
parent 09044ef7a3
commit f1618ee59b
13 changed files with 85 additions and 37 deletions
+3 -2
View File
@@ -18,6 +18,7 @@ import (
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/tools/filesystem"
"github.com/pocketbase/pocketbase/tools/router"
"github.com/pocketbase/pocketbase/tools/routine"
"github.com/pocketbase/pocketbase/tools/types"
"github.com/spf13/cast"
)
@@ -195,7 +196,7 @@ func (p *batchProcessor) Process(batch []*core.InternalRequest, timeout time.Dur
p.stopCh <- struct{}{}
}()
go func() {
routine.FireAndForget(func() {
err := p.process(txApp, batch, 0)
if err != nil {
@@ -216,7 +217,7 @@ func (p *batchProcessor) Process(batch []*core.InternalRequest, timeout time.Dur
}
p.errCh <- err
}()
})
select {
case responseErr := <-p.errCh: