From eccb072a5e407764dfa8307b97449742a06e0dfa Mon Sep 17 00:00:00 2001 From: Netkas Date: Sat, 17 Jun 2023 04:25:15 -0400 Subject: [PATCH] Minor refactoring --- src/TamerLib/tm.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/TamerLib/tm.php b/src/TamerLib/tm.php index b747864..5885ad0 100644 --- a/src/TamerLib/tm.php +++ b/src/TamerLib/tm.php @@ -364,25 +364,6 @@ self::addToWatchlist($job_packet->getId()); } - /** - * Preforms a do() call on a waitFor() call all in one function. - * - * @param string $function - * @param array $arguments - * @param int $channel - * @param int $timeout - * @return mixed - * @throws JobNotFoundException - * @throws ServerException - * @throws Throwable - * @throws TimeoutException - * @noinspection PhpUnused - */ - public static function doWait(string $function, array $arguments, int $channel=0, int $timeout=0): mixed - { - return self::waitFor(self::do($function, $arguments, $channel), $timeout); - } - /** * Waits for all the dispatched jobs to complete, this is a blocking function and will not return until all the * jobs have completed. If a timeout is specified, the function will return after the timeout has been reached. @@ -540,6 +521,25 @@ } } + /** + * Preforms a do() call on a waitFor() call all in one function. + * + * @param string $function + * @param array $arguments + * @param int $channel + * @param int $timeout + * @return mixed + * @throws JobNotFoundException + * @throws ServerException + * @throws Throwable + * @throws TimeoutException + * @noinspection PhpUnused + */ + public static function doWait(string $function, array $arguments, int $channel=0, int $timeout=0): mixed + { + return self::waitFor(self::do($function, $arguments, $channel), $timeout); + } + /** * Clears the watchlist, this will remove all jobs from the watchlist.