8000 Add `--no-workers` option by yguedidi · Pull Request #462 · symfony-cli/symfony-cli · GitHub
[go: up one dir, main page]

Skip to content

Add --no-workers option #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion commands/local_server_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ var localServerStartCmd = &console.Command{
// from the console argument.
EnvVars: []string{"SSLKEYLOGFILE"},
},
&console.BoolFlag{Name: "no-workers", Usage: "Do not start workers"},
},
Action: func(c *console.Context) error {
ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin)
Expand Down Expand Up @@ -308,7 +309,7 @@ var localServerStartCmd = &console.Command{
go tailer.Tail(terminal.Stderr)
}

if fileConfig != nil {
if fileConfig != nil && !config.NoWorkers {
reexec.NotifyForeground("workers")

_, isDockerComposeWorkerConfigured := fileConfig.Workers[project.DockerComposeWorkerKey]
Expand Down
4 changes: 4 additions & 0 deletions local/project/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Config struct {
Daemon bool `yaml:"daemon"`
UseGzip bool `yaml:"use_gzip"`
TlsKeyLogFile string `yaml:"tls_key_log_file"`
NoWorkers bool `yaml:"no_workers"`
}

type FileConfig struct {
Expand Down Expand Up @@ -112,6 +113,9 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File
if c.IsSet("tls-key-log-file") {
config.TlsKeyLogFile = c.String("tls-key-log-file")
}
if c.IsSet("no-workers") {
config.NoWorkers = c.Bool("no-workers")
}

return config, fileConfig, nil
}
Expand Down
0