Skip to content

Background jobs improvements#60765

Merged
Altahrim merged 5 commits into
masterfrom
feat/background-jobs-improvements
May 29, 2026
Merged

Background jobs improvements#60765
Altahrim merged 5 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 Outdated
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch 3 times, most recently from a3db24e to 417362a Compare May 28, 2026 06:56
Comment thread core/Service/CronService.php Outdated
Comment thread core/Command/Background/RunningJobs.php Outdated
Comment thread core/Command/Background/RunningJobs.php Outdated
Comment thread core/Migrations/Version34000Date20260518163022.php
Comment thread core/Migrations/Version34000Date20260518163022.php Outdated
Comment thread core/Migrations/Version34000Date20260521110333.php
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php
Comment thread lib/public/BackgroundJob/IJobRuns.php Outdated
Comment thread lib/public/BackgroundJob/IJobRuns.php Outdated
Comment thread lib/public/BackgroundJob/IJobRuns.php Outdated
Comment thread lib/public/BackgroundJob/IJobRuns.php Outdated
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch 3 times, most recently from c5794ef to 3dda7b1 Compare May 28, 2026 08:07
Comment thread lib/private/BackgroundJob/JobClassesRegistry.php Outdated
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch 2 times, most recently from 766f8a1 to f89849e Compare May 28, 2026 09:38
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels May 28, 2026
@Altahrim
Copy link
Copy Markdown
Collaborator Author

/backport! to stable34 please

@Altahrim
Copy link
Copy Markdown
Collaborator Author

Never ending Oracle tests sounds related...

@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch 3 times, most recently from 4355915 to 16bc73f Compare May 29, 2026 06:43
Altahrim added 5 commits May 29, 2026 09:14
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>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
@Altahrim Altahrim force-pushed the feat/background-jobs-improvements branch from 16bc73f to f881e95 Compare May 29, 2026 07:14
@skjnldsv
Copy link
Copy Markdown
Member

Failures unrelated, I would force merge

@Altahrim
Copy link
Copy Markdown
Collaborator Author

Yes, I was about to do so :)

@Altahrim Altahrim merged commit f897ec6 into master May 29, 2026
164 of 176 checks passed
@Altahrim Altahrim deleted the feat/background-jobs-improvements branch May 29, 2026 08:06
@Altahrim

This comment was marked as outdated.

@backportbot

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants