This commit is contained in:
ponzischeme89
2026-08-19 14:25:44 +12:00
parent 2b43b9ef12
commit 590e069366
83 changed files with 8948 additions and 1266 deletions
+6 -2
View File
@@ -19,6 +19,8 @@ import (
"sync"
"time"
"github.com/ponzischeme89/memby/server/internal/runtimestats"
"github.com/ponzischeme89/memby/server/internal/adminevents"
"github.com/ponzischeme89/memby/server/internal/notify"
"github.com/ponzischeme89/memby/server/internal/store"
@@ -108,7 +110,9 @@ func (d *Dispatcher) register(transport Transport) {
// of events a minute, and serialising them means a destination cannot be hit with four
// concurrent posts by a burst.
func (d *Dispatcher) Start(ctx context.Context) {
go func() {
// Named rather than launched bare, so the console can say this worker is running
// without having to infer it from a stack. See internal/runtimestats.
runtimestats.Go("Integrations dispatcher", "Integrations", func() {
for {
select {
case <-ctx.Done():
@@ -126,7 +130,7 @@ func (d *Dispatcher) Start(ctx context.Context) {
d.deliver(ctx, work)
}
}
}()
})
}
// DeliverAdminEvent implements adminevents.Sink. It only enqueues: the bus calls this