Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/jobs/reports/drop_off_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def configs
def report_maker(issuers)
Reporting::DropOffReport.new(
issuers: issuers,
time_range: report_date.all_month,
slice: 1.month,
time_range: report_date.all_week,
slice: 1.week,
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/job_configurations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
cron: cron_24h,
args: -> { [Time.zone.yesterday.end_of_day] },
},
# Monthly drop of report
# Weekly drop of report
drop_off_report: {
class: 'Reports::DropOffReport',
cron: cron_24h,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that the report runs every night to show the past week's worth of data?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering about this too..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Good point. Should this be cron_1w instead? Or is there logic in the report to determine when it actually runs? 🤔

Copy link
Copy Markdown
Contributor

@Sgtpluck Sgtpluck May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cron: cron_24h,
cron: cron_1w,

Expand Down
2 changes: 1 addition & 1 deletion spec/jobs/reports/drop_off_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

subject.report_date = report_date

expect(subject.report_maker([]).time_range).to eq(report_date.all_month)
expect(subject.report_maker([]).time_range).to eq(report_date.all_week)
end
end
end