Skip to content

Commit

Permalink
Bug with "limfifottl" queues when capacity is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelFil authored Oct 20, 2022
1 parent a4e3934 commit b3d2538
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ public function getName() : string
/**
* @param mixed $data
*/
public function put($data, array $options = []) : Task
public function put($data, array $options = []) : ?Task
{
return Task::fromTuple(
$this->client->call("queue.tube.$this->name:put", $data, $options)[0]
);
$result = $this->client->call("queue.tube.$this->name:put", $data, $options);
return is_null($result[0]) ? null : Task::fromTuple($result[0]);
}

public function take(float $timeout = null) : ?Task
Expand Down

0 comments on commit b3d2538

Please sign in to comment.