From ba82426e3239395f6e658497e951221e3fc0d1aa Mon Sep 17 00:00:00 2001 From: Netkas Date: Fri, 7 Jul 2023 02:28:20 -0400 Subject: [PATCH] Fixed bug in JobManager in `\TamerLib\Classes > JobManager > returnJob()` and `\TamerLib\Classes > JobManager > returnException()` where if the "return_channel" is empty instead of null, the job would be returned to an empty channel instead of being dropped. --- CHANGELOG.md | 10 +++++++++- project.json | 2 +- src/TamerLib/Classes/JobManager.php | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b835d5..b4211d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.1.0] - 2023-07-7 +## [2.1.1] - 2023-07-07 + +### Fixed + - Fixed bug in JobManager in `\TamerLib\Classes > JobManager > returnJob()` and `\TamerLib\Classes > JobManager > returnException()` + where if the "return_channel" is empty instead of null, the job would be returned to an empty channel instead of + being dropped. + + +## [2.1.0] - 2023-07-07 ### Added - Implemented `ausleep()` in for `TamerLib\Classes\ > JobManager` to allow TamerLib to monitor sub-processes and diff --git a/project.json b/project.json index a6e3f6b..1b20f3a 100644 --- a/project.json +++ b/project.json @@ -22,7 +22,7 @@ "description": "TamerLib allows the execution of parallel tasks", "company": "Nosial", "copyright": "Copyright (c) 2022-2023 Nosial, All Rights Reserved", - "version": "2.1.0", + "version": "2.1.1", "uuid": "a365e7d6-a1c0-11ed-b7c7-b9654ed9efa5" }, "build": { diff --git a/src/TamerLib/Classes/JobManager.php b/src/TamerLib/Classes/JobManager.php index a7b350c..e382e27 100644 --- a/src/TamerLib/Classes/JobManager.php +++ b/src/TamerLib/Classes/JobManager.php @@ -694,7 +694,7 @@ } /** @noinspection PhpUndefinedVariableInspection */ - if($return_channel === null) + if($return_channel === null || $return_channel === '') { Log::debug(Utilities::getName(), sprintf('No return channel set, deleting job %s', $job_id)); $this->getClient()->del($job_id); @@ -755,7 +755,7 @@ } /** @noinspection PhpUndefinedVariableInspection */ - if($return_channel === null) + if($return_channel === null || $return_channel === '') { Log::debug(Utilities::getName(), sprintf('No return channel set, deleting job %s', $job_id)); $this->getClient()->del($job_id);