Class: Renalware::HD::Scheduling::DiaryHousekeepingJob
- Inherits:
-
Struct
- Object
- Struct
- Renalware::HD::Scheduling::DiaryHousekeepingJob
- Defined in:
- app/models/renalware/hd/scheduling/diary_housekeeping_job.rb
Instance Attribute Summary collapse
-
#up_until ⇒ Object
Returns the value of attribute up_until.
Instance Method Summary collapse
- #destroy_failed_jobs? ⇒ Boolean
- #max_attempts ⇒ Object
-
#perform ⇒ Object
:reek:UtilityFunction.
- #priority ⇒ Object
- #queue_name ⇒ Object
Instance Attribute Details
#up_until ⇒ Object
Returns the value of attribute up_until
16 17 18 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 16 def up_until @up_until end |
Instance Method Details
#destroy_failed_jobs? ⇒ Boolean
29 30 31 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 29 def destroy_failed_jobs? true end |
#max_attempts ⇒ Object
17 18 19 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 17 def max_attempts 1 end |
#perform ⇒ Object
:reek:UtilityFunction
34 35 36 37 38 39 40 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 34 def perform up_until ||= Time.zone.today - 1.day up_until = up_until.to_date create_missing_weekly_diaries move_elapsed_master_slots_into_weekly_slot_equivalent archive_old_weekly_slots(up_until) end |
#priority ⇒ Object
25 26 27 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 25 def priority 5 # medium end |
#queue_name ⇒ Object
21 22 23 |
# File 'app/models/renalware/hd/scheduling/diary_housekeeping_job.rb', line 21 def queue_name "hd_diary_houskeeping" end |