Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rake task to remove old publishing intents #1360

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

theseanything
Copy link
Contributor

We use publish intents for schedule publishing to reduce the cache time ahead of publication. However, once the associated content items is published we don’t need the intent anymore.

Looks like from the code we only delete intents if we unschedule something - but we should also be delete them them when we publish the content item.

The number of Publish Intents has impact on the performance for route reloading in Router. Currently we have to scan (do an anti-join) through all the publish intents for routes - obviously that’d be far quicker if table had a 100s vs 10000s of rows.

Previously there used to be a cronjob that periodically cleaned up old publish intents (this is based on that).

However, I can't see the replacement functionality to delete publish intents once the document is published.

Adding this rake task to allow us to clean up the existing accumulation of Publish Intent.

@theseanything theseanything force-pushed the add-publishing-intents-cleanup branch from dfe8e0b to 77be6de Compare December 6, 2024 16:05
This reverts commit 756a949, reversing
changes made to 211dade.
@theseanything theseanything force-pushed the add-publishing-intents-cleanup branch from 77be6de to 0de17fb Compare December 6, 2024 16:15
Copy link

@mike3985 mike3985 left a comment

Choose a reason for hiding this comment

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

👍

@theseanything theseanything merged commit ef5074d into main Dec 6, 2024
9 checks passed
@theseanything theseanything deleted the add-publishing-intents-cleanup branch December 6, 2024 16:18
theseanything added a commit to alphagov/govuk-helm-charts that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants