Skip to content

Commit

Permalink
Add --no-workers option
Browse files Browse the repository at this point in the history
  • Loading branch information
yguedidi committed Apr 6, 2024
1 parent 877ffa9 commit 04ad119
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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
Binary file added symfony-cli
Binary file not shown.

0 comments on commit 04ad119

Please sign in to comment.