Skip to content

Background jobs improvements#60765

Open
Altahrim wants to merge 4 commits into
masterfrom
feat/background-jobs-improvements
Open

Background jobs improvements#60765
Altahrim wants to merge 4 commits into
masterfrom
feat/background-jobs-improvements

Conversation

@Altahrim
Copy link
Copy Markdown
Collaborator

@Altahrim Altahrim commented May 27, 2026

Summary

Keep track of background jobs executions

It saves executed background jobs into database:

+-------------------+-----------------------------------------------+------+----------+----------------+
| run_id            | class_name                                    | pid  | duration | ram_peak_usage |
+-------------------+-----------------------------------------------+------+----------+----------------+
| 88476144717467648 | OCA\Files\BackgroundJob\ScanFiles             | 2481 |        0 |              0 |
| 88476592056766464 | OC\Authentication\Token\TokenCleanupJob       | 2485 |       76 |            147 |
| 88476592694300672 | OC\Log\Rotate                                 | 2485 |       50 |             21 |
| 88476593122119680 | OC\Preview\BackgroundCleanupJob               | 2485 |       47 |             38 |
| 88476593528967168 | OC\TextProcessing\RemoveOldTasksBackgroundJob | 2485 |       51 |             27 |
+-------------------+-----------------------------------------------+------+----------+----------------+

Screenshots

List running jobs:
Screenshot_2026-05-27_150303

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@Altahrim Altahrim added this to the Nextcloud 35 milestone May 27, 2026
@Altahrim Altahrim self-assigned this May 27, 2026
@Altahrim Altahrim added 2. developing Work in progress php Pull requests that update Php code labels May 27, 2026
Comment thread core/Service/CronService.php Outdated
Comment thread lib/private/BackgroundJob/JobRuns.php Outdated
Comment thread lib/private/BackgroundJob/JobRuns.php
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php Outdated
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php Outdated
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch from 6fe6a43 to 2e94a14 Compare May 27, 2026 13:13
@Altahrim
Copy link
Copy Markdown
Collaborator Author

/backport to stable34

@Altahrim Altahrim marked this pull request as ready for review May 27, 2026 13:20
@Altahrim Altahrim requested a review from a team as a code owner May 27, 2026 13:20
@Altahrim Altahrim requested review from artonge, icewind1991, leftybournes and salmart-dev and removed request for a team May 27, 2026 13:20
Comment thread lib/public/BackgroundJob/JobRun.php
Comment thread lib/public/BackgroundJob/IJobRuns.php
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php
Altahrim added 4 commits May 27, 2026 16:06
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch from 2e94a14 to 66ed05a Compare May 27, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress backport-request php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants