Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
cf5837e005 | |||
518b23cd5f |
3 changed files with 15 additions and 5 deletions
|
@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.5] - 2023-07-06
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `\TamerLib\tm > wait()` will output worker updates even if there are no jobs in the queue, this fixes a bug where
|
||||||
|
workers would not be updated if the client only calls `dof()`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.1.4] - 2023-07-28
|
## [2.1.4] - 2023-07-28
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"description": "TamerLib allows the execution of parallel tasks",
|
"description": "TamerLib allows the execution of parallel tasks",
|
||||||
"company": "Nosial",
|
"company": "Nosial",
|
||||||
"copyright": "Copyright (c) 2022-2023 Nosial, All Rights Reserved",
|
"copyright": "Copyright (c) 2022-2023 Nosial, All Rights Reserved",
|
||||||
"version": "2.1.4",
|
"version": "2.1.5",
|
||||||
"uuid": "a365e7d6-a1c0-11ed-b7c7-b9654ed9efa5"
|
"uuid": "a365e7d6-a1c0-11ed-b7c7-b9654ed9efa5"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
|
|
|
@ -464,25 +464,27 @@
|
||||||
throw new RuntimeException(sprintf('Attempting to wait() in \'%s\' mode, only clients can preform wait().', self::$mode));
|
throw new RuntimeException(sprintf('Attempting to wait() in \'%s\' mode, only clients can preform wait().', self::$mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
$time_start = time();
|
self::monitor(-1);
|
||||||
|
|
||||||
if(count(self::$watching_jobs) === 0)
|
if(count(self::$watching_jobs) === 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$time_start = time();
|
||||||
$watching_jobs = self::$watching_jobs;
|
$watching_jobs = self::$watching_jobs;
|
||||||
Log::verbose(Utilities::getName(), sprintf('Waiting for %s job(s) to complete', count($watching_jobs)));
|
Log::verbose(Utilities::getName(), sprintf('Waiting for %s job(s) to complete', count($watching_jobs)));
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
|
self::monitor(-1);
|
||||||
|
|
||||||
if(count($watching_jobs) === 0)
|
if(count($watching_jobs) === 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::monitor(-1);
|
|
||||||
$job_id = self::$job_manager->listenReturnChannel(self::$return_channel);
|
$job_id = self::$job_manager->listenReturnChannel(self::$return_channel);
|
||||||
|
|
||||||
if(!in_array($job_id, $watching_jobs, false))
|
if(!in_array($job_id, $watching_jobs, false))
|
||||||
{
|
{
|
||||||
Log::debug(Utilities::getName(), sprintf('Job \'%s\' has returned, but is not in the watchlist', $job_id));
|
Log::debug(Utilities::getName(), sprintf('Job \'%s\' has returned, but is not in the watchlist', $job_id));
|
||||||
|
@ -491,7 +493,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$job_packet = self::$job_manager->getJob($job_id);
|
$job_packet = self::$job_manager->getJob($job_id);
|
||||||
|
|
||||||
if(isset(self::$job_callbacks[$job_id]))
|
if(isset(self::$job_callbacks[$job_id]))
|
||||||
{
|
{
|
||||||
$callback = self::$job_callbacks[$job_id];
|
$callback = self::$job_callbacks[$job_id];
|
||||||
|
|
Loading…
Add table
Reference in a new issue