Skip to content

Commit 2833b2d

Browse files
authored
Add suggestion when not using workers (#58)
1 parent f1bd6ff commit 2833b2d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Commands/StaticSiteGenerate.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class StaticSiteGenerate extends Command
2121
*
2222
* @var string
2323
*/
24-
protected $signature = 'statamic:ssg:generate {--workers=1}';
24+
protected $signature = 'statamic:ssg:generate {--workers=}';
2525

2626
/**
2727
* The console command description.
@@ -51,8 +51,12 @@ public function handle()
5151
{
5252
Partyline::bind($this);
5353

54+
if (! $workers = $this->option('workers')) {
55+
$this->comment('You may be able to speed up site generation significantly by installing spatie/fork and using multiple workers (requires PHP 8+).');
56+
}
57+
5458
$this->generator
55-
->workers($this->option('workers'))
59+
->workers($workers ?? 1)
5660
->generate();
5761
}
5862
}

0 commit comments

Comments
 (0)