-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
…y unpublished editions that were scheduled for the past. Rake task was added to the publisher here alphagov/travel-advice-publisher#1859
end | ||
|
||
it "does not publish editions scheduled for future publication" do | ||
edition = create(:scheduled_travel_advice_edition, country_slug: country.slug) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
…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.
9568b4d
to
b0bc432
Compare
Trello card
Cronjob is set up in govuk-helm-charts. alphagov/govuk-helm-charts#1926