Skip to content

perf(jobs): prune background jobs of disabled users - #13631

Draft
ChristophWurst wants to merge 1 commit into
mainfrom
perf/skip-disabled-user-background-jobs
Draft

perf(jobs): prune background jobs of disabled users#13631
ChristophWurst wants to merge 1 commit into
mainfrom
perf/skip-disabled-user-background-jobs

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

Per-account jobs of disabled users early-return but still churn the cron queue: each due run reserves the job and writes to oc_jobs/ job_runs before bailing, and takes a slot in the 14-minute cron loop.

React to UserChangedEvent (enabled) to remove the per-account jobs on disable and reschedule them on enable, and make the FixBackgroundJobs repair step reconcile the two states so the existing backlog is pruned on upgrade. The in-job isEnabled() checks stay as a correctness backstop.

Assisted-by: Claude:claude-opus-4-8

馃 AI (if applicable)

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

Per-account jobs of disabled users early-return but still churn the
cron queue: each due run reserves the job and writes to oc_jobs/
job_runs before bailing, and takes a slot in the 14-minute cron loop.

React to UserChangedEvent (enabled) to remove the per-account jobs on
disable and reschedule them on enable, and make the FixBackgroundJobs
repair step reconcile the two states so the existing backlog is pruned
on upgrade. The in-job isEnabled() checks stay as a correctness
backstop.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst ChristophWurst self-assigned this Sep 3, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing AI assisted This PR contains AI-assisted commits performance 馃殌

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants