Skip to content

Commit 837186a

Browse files
committed
feed workers
1 parent 7a3e5b8 commit 837186a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ ADMIN_EMAIL=
1414

1515
PROXY_LIST=
1616

17+
FEED_WORKERS=1
18+
1719
SMTP_HOST=smtp.resend.com
1820
SMTP_PORT=587
1921
SMTP_USERNAME=resend

app/bin/lerama

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ if (empty($command)) {
3434

3535
switch ($command) {
3636
case 'feed:process':
37-
$parallel = 1;
37+
// Default to FEED_WORKERS env variable, or 1 if not set
38+
$parallel = isset($_ENV['FEED_WORKERS']) ? max(1, min(10, (int)$_ENV['FEED_WORKERS'])) : 1;
3839

39-
// Check for --parallel or -p flag
40+
// Check for --parallel or -p flag (overrides env variable)
4041
for ($i = 2; $i < count($argv); $i++) {
4142
if (in_array($argv[$i], ['--parallel', '-p']) && isset($argv[$i + 1])) {
4243
$parallel = max(1, min(10, (int)$argv[$i + 1]));

0 commit comments

Comments
 (0)