diff options
author | Valery Piashchynski <[email protected]> | 2020-12-21 10:27:10 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-21 10:27:10 +0300 |
commit | 2f71f79ac704ed95dad961677b6e602e38641b5d (patch) | |
tree | 7452bbedd1444079757a848ad07089bc6093561f /interfaces/worker | |
parent | 3d4c75aadd9ffd0d46728f48f685de2e1bfc44bb (diff) |
Remove unused contex from interfaces. Update pool allocator.
Diffstat (limited to 'interfaces/worker')
-rw-r--r-- | interfaces/worker/factory.go | 4 | ||||
-rw-r--r-- | interfaces/worker/worker.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/interfaces/worker/factory.go b/interfaces/worker/factory.go index 19e2bf5d..8db8ddcc 100644 --- a/interfaces/worker/factory.go +++ b/interfaces/worker/factory.go @@ -9,10 +9,10 @@ import ( type Factory interface { // SpawnWorkerWithContext creates new WorkerProcess process based on given command with context. // Process must not be started. - SpawnWorkerWithContext(context.Context, *exec.Cmd) (BaseProcess, error) + SpawnWorkerWithTimeout(context.Context, *exec.Cmd) (BaseProcess, error) // SpawnWorker creates new WorkerProcess process based on given command. // Process must not be started. SpawnWorker(*exec.Cmd) (BaseProcess, error) // Close the factory and underlying connections. - Close(ctx context.Context) error + Close() error } diff --git a/interfaces/worker/worker.go b/interfaces/worker/worker.go index f830fdf2..7f2f8a53 100644 --- a/interfaces/worker/worker.go +++ b/interfaces/worker/worker.go @@ -40,7 +40,7 @@ type BaseProcess interface { Wait() error // Stop sends soft termination command to the WorkerProcess and waits for process completion. - Stop(ctx context.Context) error + Stop() error // Kill kills underlying process, make sure to call Wait() func to gather // error log from the stderr. Does not waits for process completion! @@ -59,5 +59,5 @@ type SyncWorker interface { // Exec used to execute payload on the SyncWorker, there is no TIMEOUTS Exec(rqs payload.Payload) (payload.Payload, error) // ExecWithContext used to handle Exec with TTL - ExecWithContext(ctx context.Context, p payload.Payload) (payload.Payload, error) + ExecWithTimeout(ctx context.Context, p payload.Payload) (payload.Payload, error) } |