Queue Better exception handling

This commit is contained in:
Lucas Bartholemy 2018-08-16 17:38:41 +02:00
parent d9e23d3d3d
commit 6c32f33838

View File

@ -11,6 +11,7 @@ namespace humhub\modules\queue\helpers;
use Yii;
use yii\base\BaseObject;
use yii\base\InvalidArgumentException;
use yii\base\InvalidParamException;
use yii\queue\Queue;
use humhub\modules\queue\interfaces\ExclusiveJobInterface;
use humhub\modules\queue\models\QueueExclusive;
@ -38,6 +39,9 @@ class QueueHelper extends BaseObject
} catch (InvalidArgumentException $ex) {
// not exists
$jobInQueue = false;
} catch (InvalidParamException $ex) {
// not exists
$jobInQueue = false;
}
if (!$jobInQueue) {