Skip to content

[18][UPD] add empty batch remove when job vaccum - #916

Open
julienCozo wants to merge 1 commit into
OCA:18.0from
julienCozo:18.0-add-queue-job-batch-vaccum
Open

[18][UPD] add empty batch remove when job vaccum#916
julienCozo wants to merge 1 commit into
OCA:18.0from
julienCozo:18.0-add-queue-job-batch-vaccum

Conversation

@julienCozo

@julienCozo julienCozo commented Mar 24, 2026

Copy link
Copy Markdown

When queue jobs performing its vaccuum, delete also queue batch where job_ids is 0.

@julienCozo
julienCozo force-pushed the 18.0-add-queue-job-batch-vaccum branch from 3391f84 to 204eb72 Compare March 24, 2026 15:40
@julienCozo
julienCozo force-pushed the 18.0-add-queue-job-batch-vaccum branch from 204eb72 to 84085d3 Compare March 24, 2026 15:44

@remi-filament remi-filament left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @julienCozo

@remi-filament

Copy link
Copy Markdown

@julienCozo can you rename the PR "[18.0][IMP] queue_job_batch: vacuum empty batches"
This one is port of #764 from v16, which was closed.
@AnizR do you mind reviewing this one as well ?

Comment on lines +42 to +44
for batch in batches:
if not batch.job_ids:
batch.unlink()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant with ("job_ids", "=", False) above, therefore?

Suggested change
for batch in batches:
if not batch.job_ids:
batch.unlink()
batches.unlink()

@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants