Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Commands/ReloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function reloadRoadRunnerServer()

$this->info('Reloading workers...');

$inspector->reloadServer(base_path());
$inspector->reloadServer();

return 0;
}
Expand Down
5 changes: 2 additions & 3 deletions src/RoadRunner/ServerProcessInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ public function serverIsRunning(): bool
/**
* Reload the RoadRunner workers.
*
* @param string $basePath
* @return void
*/
public function reloadServer(string $basePath): void
public function reloadServer(): void
{
$this->processFactory->createProcess([
'./rr', 'reset',
], $basePath, null, null, null)->mustRun();
], base_path(), null, null, null)->mustRun();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/RoadRunnerServerProcessInspectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ public function test_roadrunner_server_process_can_be_reloaded()

$processFactory->shouldReceive('createProcess')->with(
['./rr', 'reset'],
'base-path',
base_path(),
null,
null,
null
)->andReturn($process = Mockery::mock('stdClass'));

$process->shouldReceive('mustRun')->once()->andReturn(0);

$inspector->reloadServer('base-path');
$inspector->reloadServer();
}
}