From e684ac16035bed9a4c09677b0db3b33477955dc9 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 24 Feb 2021 00:12:05 +0300 Subject: Fix pool behavior, update tests --- pkg/pool/interface.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/pool/interface.go') diff --git a/pkg/pool/interface.go b/pkg/pool/interface.go index bfc56c3f..4ef2f2e7 100644 --- a/pkg/pool/interface.go +++ b/pkg/pool/interface.go @@ -15,9 +15,6 @@ type Pool interface { // Exec executes task with payload Exec(rqs payload.Payload) (payload.Payload, error) - // ExecWithContext executes task with context which is used with timeout - ExecWithContext(ctx context.Context, rqs payload.Payload) (payload.Payload, error) - // Workers returns worker list associated with the pool. Workers() (workers []worker.BaseProcess) @@ -26,4 +23,7 @@ type Pool interface { // Destroy all underlying stack (but let them to complete the task). Destroy(ctx context.Context) + + // ExecWithContext executes task with context which is used with timeout + execWithTTL(ctx context.Context, rqs payload.Payload) (payload.Payload, error) } -- cgit v1.2.3