Skip to content

Commit 388ca17

Browse files
committed
fix: Appease psalm
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 2c08ef0 commit 388ca17

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

lib/BackgroundJob/ContextChat/ScheduleJob.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,9 @@ protected function run($argument): void {
7171

7272
foreach ($mailboxes as $mailbox) {
7373
try {
74-
if ($this->taskService->findByMailboxId($mailbox->getId())) {
75-
continue;
76-
}
77-
} catch (DoesNotExistException|MultipleObjectsReturnedException|Exception $e) {
78-
$this->logger->debug('Could not find tasks for mailbox <' . $mailbox->getId() . '>');
79-
continue;
80-
}
81-
try {
74+
$this->taskService->findByMailboxId($mailbox->getId());
8275
$this->taskService->updateOrCreate($mailbox->getId(), 0);
83-
} catch (MultipleObjectsReturnedException|Exception $e) {
76+
} catch (DoesNotExistException|MultipleObjectsReturnedException|Exception $e) {
8477
$this->logger->warning('Could not schedule context chat indexing tasks for mailbox <' . $mailbox->getId() . '>');
8578
}
8679
}

lib/Service/ContextChat/TaskService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function findNext(): Task {
3232
}
3333

3434
/**
35-
* @param string $mailboxId
35+
* @param int $mailboxId
3636
* @return Task
3737
* @throws DoesNotExistException
3838
* @throws Exception

0 commit comments

Comments
 (0)