summaryrefslogtreecommitdiff
path: root/pkg/pool
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-05 17:37:17 +0300
committerValery Piashchynski <[email protected]>2021-01-05 17:37:17 +0300
commit13b01ccaba1eedeb99d37842ec8f2019d2625187 (patch)
treec645c240336666fa63d70ed2703a78df828c597f /pkg/pool
parent877b0ed461c7d5e1de87b7561f414aeb236cf3ec (diff)
Finish implementation of the KV
Diffstat (limited to 'pkg/pool')
-rwxr-xr-xpkg/pool/static_pool.go2
-rwxr-xr-xpkg/pool/static_pool_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/pool/static_pool.go b/pkg/pool/static_pool.go
index 808e7d35..bb53e121 100755
--- a/pkg/pool/static_pool.go
+++ b/pkg/pool/static_pool.go
@@ -234,7 +234,7 @@ func defaultErrEncoder(sp *StaticPool) ErrorEncoder {
return func(err error, w worker.BaseProcess) (payload.Payload, error) {
const op = errors.Op("error encoder")
// soft job errors are allowed
- if errors.Is(errors.ErrSoftJob, err) {
+ if errors.Is(errors.SoftJob, err) {
if sp.cfg.MaxJobs != 0 && w.State().NumExecs() >= sp.cfg.MaxJobs {
err = sp.ww.AllocateNew()
if err != nil {
diff --git a/pkg/pool/static_pool_test.go b/pkg/pool/static_pool_test.go
index acdd6ab7..53d6b191 100755
--- a/pkg/pool/static_pool_test.go
+++ b/pkg/pool/static_pool_test.go
@@ -158,7 +158,7 @@ func Test_StaticPool_JobError(t *testing.T) {
assert.Nil(t, res.Body)
assert.Nil(t, res.Context)
- if errors.Is(errors.ErrSoftJob, err) == false {
+ if errors.Is(errors.SoftJob, err) == false {
t.Fatal("error should be of type errors.Exec")
}