mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2026-05-27 05:07:56 +02:00
major refactor: sig ch, remove conf settings, jetstream pub, ci
* This is a major refactor and includes general improvements around - context cancellation - build settings - jetstream pub sub - logging - docker builds - conf loading
This commit is contained in:
@@ -7,6 +7,10 @@ import (
|
||||
"github.com/alitto/pond"
|
||||
)
|
||||
|
||||
const (
|
||||
idleTimeout = 1 * time.Second
|
||||
)
|
||||
|
||||
type Opts struct {
|
||||
Concurrency int
|
||||
QueueSize int
|
||||
@@ -18,7 +22,7 @@ func NewPool(ctx context.Context, o Opts) *pond.WorkerPool {
|
||||
o.Concurrency,
|
||||
o.QueueSize,
|
||||
pond.MinWorkers(o.Concurrency),
|
||||
pond.IdleTimeout(time.Second*1),
|
||||
pond.IdleTimeout(idleTimeout),
|
||||
pond.Context(ctx),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user