Open garethrees opened 5 years ago
Had another of these
Seeing this in Sweden
Steps to attempt a manual resend:
# find request
info_request = InfoRequest.find(id)
# find outgoing message
outgoing_message = info_request.outgoing_messages.first
# create mail
mail_message = OutgoingMailer.initial_request(
outgoing_message.info_request,
outgoing_message
)
# deliver mail
mail_message.deliver_now
# record delivery
outgoing_message.record_email_delivery(
mail_message.to_addrs.join(', '),
mail_message.message_id
)
We experienced an issue with a deploy yesterday which prevented mails from being sent.
unsent_requests = InfoRequest.where(created_at: (Date.yesterday...)).reject { |r| r.last_event_forming_initial_request rescue false }
unsent_requests.count #=> 15
unsent_requests.each do |info_request|
# find outgoing message
outgoing_message = info_request.outgoing_messages.first
# create mail
mail_message = OutgoingMailer.initial_request(
outgoing_message.info_request,
outgoing_message
)
# deliver mail
mail_message.deliver_now
# record delivery
outgoing_message.record_email_delivery(
mail_message.to_addrs.join(', '),
mail_message.message_id
)
end
Like https://github.com/mysociety/alaveteli/issues/3131#issuecomment-219404742, the request loads now.
I think what's happened is that the request has appeared in the dashboard before the batch has managed to finish sending.