diff options
author | Valery Piashchynski <[email protected]> | 2021-01-13 11:11:36 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-13 11:11:36 +0300 |
commit | c3cf1d988b980e9408862d380f7ae33dae501e05 (patch) | |
tree | 79430ed15f75e23242e921a1471633e33279c395 /pkg/pool/supervisor_pool.go | |
parent | 44b0ad21e0d70e413a62814fb408faa033b0d478 (diff) |
Update styly of the .rr.yaml
Add comments
Add support for the automatically set RR_RPC, RR_HTTP env variables for
the worker process.
Diffstat (limited to 'pkg/pool/supervisor_pool.go')
-rwxr-xr-x | pkg/pool/supervisor_pool.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/pool/supervisor_pool.go b/pkg/pool/supervisor_pool.go index 378be7dd..2e919eae 100755 --- a/pkg/pool/supervisor_pool.go +++ b/pkg/pool/supervisor_pool.go @@ -54,7 +54,7 @@ func (sp *supervised) ExecWithContext(ctx context.Context, rqs payload.Payload) } c := make(chan ttlExec, 1) - ctx, cancel := context.WithTimeout(ctx, time.Second*time.Duration(sp.cfg.ExecTTL)) + ctx, cancel := context.WithTimeout(ctx, time.Duration(sp.cfg.ExecTTL)*time.Second) defer cancel() go func() { res, err := sp.pool.ExecWithContext(ctx, rqs) @@ -114,7 +114,7 @@ func (sp *supervised) Destroy(ctx context.Context) { func (sp *supervised) Start() { go func() { - watchTout := time.NewTicker(time.Second * time.Duration(sp.cfg.WatchTick)) + watchTout := time.NewTicker(time.Duration(sp.cfg.WatchTick) * time.Second) for { select { case <-sp.stopCh: |