Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Oct 28, 2024
1 parent 4c6dc04 commit 255f90e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/PhpBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Laravel\Horizon;

use Illuminate\Support\ProcessUtils;

class PhpBinary
{
/**
Expand All @@ -11,8 +13,10 @@ class PhpBinary
*/
public static function path()
{
$escape = '\\' === DIRECTORY_SEPARATOR ? '"' : '\'';
if (function_exists('Illuminate\Support\php_binary')) {
return ProcessUtils::escapeArgument(\Illuminate\Support\php_binary());
}

return $escape.PHP_BINARY.$escape;
return ProcessUtils::escapeArgument(PHP_BINARY);
}
}
2 changes: 2 additions & 0 deletions tests/Feature/SupervisorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ protected function tearDown(): void
parent::tearDown();
}

/** @requires extension redis */
public function test_supervisor_can_start_worker_process_with_given_options()
{
Queue::push(new Jobs\BasicJob);
Expand Down Expand Up @@ -260,6 +261,7 @@ public function test_supervisor_can_restart_processes()
$this->assertNotEquals($pid, $supervisor->processes()[0]->getPid());
}

/** @requires extension redis */
public function test_processes_can_be_paused_and_continued()
{
$options = $this->supervisorOptions();
Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function setUp(): void
*/
public function wait($callback)
{
retry(10, $callback, 2000);
retry(10, $callback, 1000);
}

/**
Expand Down

0 comments on commit 255f90e

Please sign in to comment.