Skip to content

Commit

Permalink
Declare @throws in HandlesTasks delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas committed Dec 13, 2023
1 parent c5d217c commit 94030d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Endpoints/Delegates/HandlesTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Meilisearch\Contracts\TasksQuery;
use Meilisearch\Contracts\TasksResults;
use Meilisearch\Endpoints\Tasks;
use Meilisearch\Exceptions\TimeOutException;

trait HandlesTasks
{
Expand Down Expand Up @@ -38,11 +39,17 @@ public function cancelTasks(CancelTasksQuery $options = null): array
return $this->tasks->cancelTasks($options);
}

/**
* @throws TimeOutException
*/
public function waitForTask($uid, int $timeoutInMs = 5000, int $intervalInMs = 50): array
{
return $this->tasks->waitTask($uid, $timeoutInMs, $intervalInMs);
}

/**
* @throws TimeOutException
*/
public function waitForTasks($uids, int $timeoutInMs = 5000, int $intervalInMs = 50): array
{
return $this->tasks->waitTasks($uids, $timeoutInMs, $intervalInMs);
Expand Down

0 comments on commit 94030d3

Please sign in to comment.