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

Adding a daily task to catch any potentially unpublished editions. #1859

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

baisa
Copy link
Contributor

@baisa baisa commented Mar 27, 2024

Trello card

Cronjob is set up in govuk-helm-charts. alphagov/govuk-helm-charts#1926

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

baisa added a commit to alphagov/govuk-helm-charts that referenced this pull request Mar 27, 2024
…y unpublished editions that were scheduled for the past.

Rake task was added to the publisher here alphagov/travel-advice-publisher#1859
@baisa baisa marked this pull request as ready for review March 27, 2024 12:59
end

it "does not publish editions scheduled for future publication" do
edition = create(:scheduled_travel_advice_edition, country_slug: country.slug)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can write it as: edition = create(:scheduled_travel_advice_edition, scheduled_publication_time: 5.hours.from_now, country_slug: country.slug), as there have been some changes in the factory.

@@ -0,0 +1,6 @@
desc "Cronjob running daily to catch potentially unpublished editions"
task publish_scheduled_editions: :environment do
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to follow convention, have the name of the file match the name of the task.

@@ -0,0 +1,32 @@
require "rake"
describe "publish_scheduled_editions", type: :rake_task do
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to follow convention, have the name of the file match the name of the task.

baisa added a commit to alphagov/govuk-helm-charts that referenced this pull request Mar 28, 2024
…y unpublished editions that were scheduled for the past.

Rake task was added to the publisher here alphagov/travel-advice-publisher#1859
…t were scheduled for the past.

Cronjob is set up in govuk-helm-charts.
@baisa baisa force-pushed the cronjob-to-publish-missed-scheduled-editions branch from 9568b4d to b0bc432 Compare March 28, 2024 08:30
@baisa baisa merged commit 4996e05 into main Mar 28, 2024
14 checks passed
@baisa baisa deleted the cronjob-to-publish-missed-scheduled-editions branch March 28, 2024 08:33
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