Add EmailListCreateJob
This commit is contained in:
parent
5236eda39d
commit
ca63818181
2 changed files with 8 additions and 1 deletions
7
app/jobs/email_list_create_job.rb
Normal file
7
app/jobs/email_list_create_job.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class EmailListCreateJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(npo_id)
|
||||
UpdateEmailLists.populate_lists_on_mailchimp(npo_id)
|
||||
end
|
||||
end
|
|
@ -36,7 +36,7 @@ module InsertEmailLists
|
|||
.returning('*')
|
||||
.execute
|
||||
|
||||
UpdateEmailLists.delay.populate_lists_on_mailchimp(npo_id)
|
||||
EmailListCreateJob.perform_later(npo_id)
|
||||
|
||||
{ deleted: deleted, deleted_result: result, inserted_lists: inserted_lists, inserted_result: lists }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue