Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
chore: remove unused config option
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
  • Loading branch information
rustatian committed Oct 21, 2023
1 parent 1ce39ba commit ab99a50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pool/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

// Factory is responsible for wrapping given command into tasks WorkerProcess.
type Factory interface {
// SpawnWorkerWithTimeout creates new WorkerProcess process based on given command with context.
// SpawnWorkerWithTimeout creates a new WorkerProcess process based on given command with context.
// Process must not be started.
SpawnWorkerWithTimeout(context.Context, *exec.Cmd) (*worker.Process, error)
// SpawnWorker creates new WorkerProcess process based on given command.
// SpawnWorker creates a new WorkerProcess process based on given command.
// Process must not be started.
SpawnWorker(*exec.Cmd) (*worker.Process, error)
// Close the factory and underlying connections.
Expand Down
6 changes: 2 additions & 4 deletions pool/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ type Config struct {
Debug bool
// Command used to override the server command with the custom one
Command []string `mapstructure:"command"`
// AfterInitCommand command used to override the server's AfterInitCommand
AfterInitCommand []string `mapstructure:"after_init"`
// NumWorkers defines how many sub-processes can be run at once. This value
// might be doubled by Swapper while hot-swap. Defaults to number of CPU cores.
NumWorkers uint64 `mapstructure:"num_workers"`
Expand Down Expand Up @@ -66,10 +64,10 @@ type SupervisorConfig struct {
// WatchTick defines how often to check the state of worker.
WatchTick time.Duration `mapstructure:"watch_tick"`

// TTL defines maximum time for the worker is allowed to live.
// TTL defines the maximum time for the worker is allowed to live.
TTL time.Duration `mapstructure:"ttl"`

// IdleTTL defines maximum duration worker can spend in idle mode. Disabled when 0.
// IdleTTL defines the maximum duration worker can spend in idle mode. Disabled when 0.
IdleTTL time.Duration `mapstructure:"idle_ttl"`

// ExecTTL defines maximum lifetime per job.
Expand Down
2 changes: 1 addition & 1 deletion pool/static_pool/workers_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Pool struct {
mu sync.RWMutex
}

// NewPool creates new worker pool and task multiplexer. Pool will initiate with one worker. If supervisor configuration is provided -> pool will be turned into a supervisedExec mode
// NewPool creates a new worker pool and task multiplexer. Pool will initiate with one worker. If supervisor configuration is provided -> pool will be turned into a supervisedExec mode
func NewPool(ctx context.Context, cmd pool.Command, factory pool.Factory, cfg *pool.Config, log *zap.Logger, options ...Options) (*Pool, error) {
if factory == nil {
return nil, errors.Str("no factory initialized")
Expand Down

0 comments on commit ab99a50

Please sign in to comment.