Skip to content

Commit

Permalink
Merge pull request #1165 from nextcloud/getJobsIterator
Browse files Browse the repository at this point in the history
Switch to getJobsIterator
  • Loading branch information
tacruc committed Dec 3, 2023
2 parents 7060521 + d16a93b commit 3d0acb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Service/PhotofilesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,17 @@ public function deleteByFolderIdUserId($folderId, $userId) {
public function getBackgroundJobStatus($userId): array {
$add_counter = 0;
$addJobsRunning = False;
# ToDo when NC 25 is Dropped foreach ($this->jobList->getJobsIterator(AddPhotoJob::class, Null, 0) as $job) {
foreach ($this->jobList->getJobs(AddPhotoJob::class, Null, 0) as $job) {

foreach ($this->jobList->getJobsIterator(AddPhotoJob::class, Null, 0) as $job) {
if ($job->getArgument()['userId'] === $userId) {
$add_counter += 1;
}
$addJobsRunning = True;
}
$update_counter = 0;
$updateJobsRunning = False;
# ToDo when NC 25 is Dropped foreach ($this->jobList->getJobsIterator(UpdatePhotoByFileJob::class, Null, 0) as $job) {
foreach ($this->jobList->getJobs(UpdatePhotoByFileJob::class, Null, 0) as $job) {

foreach ($this->jobList->getJobsIterator(UpdatePhotoByFileJob::class, Null, 0) as $job) {
if ($job->getArgument()['userId'] === $userId) {
$update_counter += 1;
}
Expand Down

0 comments on commit 3d0acb8

Please sign in to comment.