Class: Renalware::HD::UpdateRollingPatientStatisticsDjJob
- Inherits:
-
Struct
- Object
- Struct
- Renalware::HD::UpdateRollingPatientStatisticsDjJob
- Defined in:
- app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb
Instance Attribute Summary collapse
-
#patient_id ⇒ Object
Returns the value of attribute patient_id.
Instance Method Summary collapse
- #destroy_failed_jobs? ⇒ Boolean
- #max_attempts ⇒ Object
- #perform ⇒ Object
- #priority ⇒ Object
- #queue_name ⇒ Object
-
#reschedule_at(current_time, attempts) ⇒ Object
Retry at intervals of 1, 2, 3 hours.
Instance Attribute Details
#patient_id ⇒ Object
Returns the value of attribute patient_id
10 11 12 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 10 def patient_id @patient_id end |
Instance Method Details
#destroy_failed_jobs? ⇒ Boolean
28 29 30 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 28 def destroy_failed_jobs? true end |
#max_attempts ⇒ Object
16 17 18 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 16 def max_attempts 2 end |
#perform ⇒ Object
11 12 13 14 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 11 def perform patient = Renalware::HD::Patient.find(patient_id) UpdateRollingPatientStatistics.new(patient: patient).call end |
#priority ⇒ Object
24 25 26 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 24 def priority 4 end |
#queue_name ⇒ Object
20 21 22 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 20 def queue_name "hd_patient_statistics" end |
#reschedule_at(current_time, attempts) ⇒ Object
Retry at intervals of 1, 2, 3 hours
33 34 35 |
# File 'app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb', line 33 def reschedule_at(current_time, attempts) current_time + attempts.hours end |