Skip to content

Commit 40216b3

Browse files
committed
Remove timeout option
1 parent 8c1d19a commit 40216b3

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/SendEmailsCommand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SendEmailsCommand extends Command
1313
*
1414
* @var string
1515
*/
16-
protected $signature = 'email:send {--timeout=300}';
16+
protected $signature = 'email:send';
1717

1818
/**
1919
* The console command description.
@@ -48,8 +48,6 @@ public function __construct(Store $store)
4848
*/
4949
public function handle()
5050
{
51-
set_time_limit($this->option('timeout'));
52-
5351
$emails = $this->store->getQueue();
5452

5553
if ($emails->isEmpty()) {
@@ -73,8 +71,6 @@ public function handle()
7371
$progress->finish();
7472

7573
$this->result($emails);
76-
77-
set_time_limit(0);
7874
}
7975

8076
/**

tests/SendEmailsCommandTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,4 @@ public function the_failed_status_and_error_is_cleared_if_a_previously_failed_em
122122
$this->assertFalse($email->fresh()->hasFailed());
123123
$this->assertEmpty($email->fresh()->getError());
124124
}
125-
126-
/** @test */
127-
public function the_command_will_be_stopped_after_the_timeout()
128-
{
129-
$this->assertEquals(0, ini_get('max_execution_time'));
130-
131-
$this->artisan('email:send');
132-
133-
$this->assertEquals(300, ini_get('max_execution_time'));
134-
135-
$this->artisan('email:send', ['--timeout' => 60]);
136-
137-
$this->assertEquals(60, ini_get('max_execution_time'));
138-
}
139125
}

0 commit comments

Comments
 (0)