saving work
This commit is contained in:
@@ -120,7 +120,9 @@ func (tr *Runner) Run(key Key, fn Fn, opts ...Option) *qTask {
|
||||
tr.queue[key.Key()] = task
|
||||
tr.mu.Unlock()
|
||||
|
||||
log.Debug("Waiting for limiter")
|
||||
tr.limiter.Take()
|
||||
log.Debug("Got tag from limiter")
|
||||
|
||||
go func() {
|
||||
defer func() {
|
||||
@@ -156,7 +158,7 @@ func NewRunner(ctx context.Context, defaultOpts ...Option) *Runner {
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
pause: make(chan struct{}),
|
||||
limiter: ratelimit.New(1),
|
||||
limiter: ratelimit.New(10),
|
||||
}
|
||||
|
||||
return tr
|
||||
|
||||
Reference in New Issue
Block a user