Skip to content

Commit 385ec93

Browse files
committed
Removing errant file, and using the all_records method now to simplify sending logic
1 parent 873f666 commit 385ec93

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

app/components/cms_email_course_list_component.rb

-31
This file was deleted.

app/jobs/send_cms_emails_job.rb

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
class SendCmsEmailsJob < ApplicationJob
22
PER_PAGE = 50
33
def perform
4-
page = 1
5-
loop do
6-
email_templates = Cms::Collections::EmailTemplate.all(page, PER_PAGE)
7-
email_templates.resources.each { process_template(_1) }
8-
break if (page * PER_PAGE) > email_templates.total_records
9-
page += 1
10-
end
4+
email_templates = Cms::Collections::EmailTemplate.all_records
5+
email_templates.each { process_template(_1) }
116
end
127

138
def process_template(template)

0 commit comments

Comments
 (0)