Skip to content

Commit

Permalink
Add grabUnique param to WorkerFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
bzikarsky committed Jan 28, 2019
1 parent 37407c4 commit db54b79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ function ($error) use ($deferred) {
return $deferred->promise();
}

public function createWorker($host, $port)
public function createWorker($host, $port, bool $grabUniques = false)
{
$deferred = new Deferred();
$this->connector->create($host, $port)->then(
function ($stream) use ($deferred) {
function ($stream) use ($deferred, $grabUniques) {
$connection = new Connection($stream, $this->commandFactory);
$client = new Worker($connection);
$client = new Worker($connection, $grabUniques);

$client->ping()->then(
function () use ($deferred, $client) {
Expand Down

0 comments on commit db54b79

Please sign in to comment.