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

DocumentPublisher doesn't handle PublishingAPI timeouts well #1050

Open
fofr opened this issue Aug 9, 2017 · 1 comment
Open

DocumentPublisher doesn't handle PublishingAPI timeouts well #1050

fofr opened this issue Aug 9, 2017 · 1 comment

Comments

@fofr
Copy link
Contributor

fofr commented Aug 9, 2017

If Publishing API times out but still succeeds with publishing the document, when the document publisher retries the second call to publisher will error. The affect of this is that any of the subsequent code does not run - ie Rummager is not updated and no emails are sent.

Services.publishing_api.publish(document.content_id)
published_document = document.class.find(document.content_id)
indexable_document = SearchPresenter.new(published_document)
RummagerWorker.perform_async(
document.search_document_type,
document.base_path,
indexable_document.to_json,
)
if document.send_email_on_publish?
EmailAlertApiWorker.perform_async(EmailAlertPresenter.new(document).to_json)
end

Found by @thomasleese when investigating:
https://govuk.zendesk.com/agent/tickets/2303234

@thomasleese
Copy link
Contributor

Solved for Rummager #1063 but still a problem with emails.

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

No branches or pull requests

2 participants