Class: Form1010cg::SubmissionJob
Constant Summary
collapse
- STATSD_KEY_PREFIX =
"#{Form1010cg::Auditor::STATSD_KEY_PREFIX}.async.".freeze
- DD_ZSF_TAGS =
[
'caregiver-application',
'function: 10-10CG async form submission'
].freeze
Class Method Summary
collapse
Instance Method Summary
collapse
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Class Method Details
.send_failure_email(parsed_form) ⇒ Object
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'app/sidekiq/form1010cg/submission_job.rb', line 61
def self.send_failure_email(parsed_form)
first_name = parsed_form.dig('veteran', 'fullName', 'first')
email = parsed_form.dig('veteran', 'email')
template_id = Settings.vanotify.services.health_apps_1010.template_id.form1010_cg_failure_email
api_key = Settings.vanotify.services.health_apps_1010.api_key
salutation = first_name ? "Dear #{first_name}," : ''
VANotify::EmailJob.perform_async(
email,
template_id,
{ 'salutation' => salutation },
api_key
)
StatsD.increment("#{STATSD_KEY_PREFIX}submission_failure_email_sent")
end
|
Instance Method Details
#notify(params) ⇒ Object
34
35
36
37
38
39
40
|
# File 'app/sidekiq/form1010cg/submission_job.rb', line 34
def notify(params)
retry_count = Integer(params['retry_count']) + 1
StatsD.increment("#{STATSD_KEY_PREFIX}applications_retried") if retry_count == 1
StatsD.increment("#{STATSD_KEY_PREFIX}failed_ten_retries", tags: ["params:#{params}"]) if retry_count == 10
end
|
#retry_limits_for_notification ⇒ Object
30
31
32
|
# File 'app/sidekiq/form1010cg/submission_job.rb', line 30
def retry_limits_for_notification
[1, 10]
end
|