We send a confirmation email during the PensionBenefitsIntakeJob. There's no way to 'undo' this step, and we don't have any checks in place to see if the confirmation email was already sent, so this step could get run more than once if the job fails after this step. (It's unlikely the job will fail after this, since all we do afterwards is log the success, but in a worst-case scenario...)
Update Sidekiq job to check whether a confirmation email has been sent for the claim before sending the confirmation email, or otherwise prevent the confirmation email from being able to be sent twice.
One method of doing this might be to use a batch job of some type - see here in Slack.
Recommend beginning by seeing if Sidekick::Batch.new will work: example
We send a confirmation email during the PensionBenefitsIntakeJob. There's no way to 'undo' this step, and we don't have any checks in place to see if the confirmation email was already sent, so this step could get run more than once if the job fails after this step. (It's unlikely the job will fail after this, since all we do afterwards is log the success, but in a worst-case scenario...)
Update Sidekiq job to check whether a confirmation email has been sent for the claim before sending the confirmation email, or otherwise prevent the confirmation email from being able to be sent twice.
One method of doing this might be to use a batch job of some type - see here in Slack.
Recommend beginning by seeing if
Sidekick::Batch.new
will work: example