summaryrefslogtreecommitdiffstats
path: root/lib/Service/QueueService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/QueueService.php')
-rw-r--r--lib/Service/QueueService.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Service/QueueService.php b/lib/Service/QueueService.php
index e1d39357..b95f7415 100644
--- a/lib/Service/QueueService.php
+++ b/lib/Service/QueueService.php
@@ -32,7 +32,6 @@ namespace OCA\Social\Service;
use daita\MySmallPhpTools\Traits\TArrayTools;
-use Exception;
use OCA\Social\Db\RequestQueueRequest;
use OCA\Social\Exceptions\EmptyQueueException;
use OCA\Social\Exceptions\NoHighPriorityRequestException;
@@ -81,7 +80,6 @@ class QueueService {
* @param string $author
*
* @return string
- * @throws Exception
*/
public function generateRequestQueue(array $instancePaths, ACore $item, string $author
): string {
@@ -197,14 +195,15 @@ class QueueService {
/**
* @param RequestQueue $queue
* @param bool $success
- *
- * @throws QueueStatusException
*/
public function endRequest(RequestQueue $queue, bool $success) {
- if ($success === true) {
- $this->requestQueueRequest->setAsSuccess($queue);
- } else {
- $this->requestQueueRequest->setAsFailure($queue);
+ try {
+ if ($success === true) {
+ $this->requestQueueRequest->setAsSuccess($queue);
+ } else {
+ $this->requestQueueRequest->setAsFailure($queue);
+ }
+ } catch (QueueStatusException $e) {
}
}