-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Email TOS * Fix travis yet again * Create an order
- Loading branch information
Cory McDonald
authored
Jun 19, 2019
1 parent
5b81419
commit 48b5494
Showing
6 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
p.salutation= t "publisher_mailer.shared.salutation", name: @publisher.name | ||
|
||
p== t(".body", link: ENV["CALENDLY_LINK"], month: Date.today.strftime("%B")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace :email do | ||
task :tos_update => :environment do | ||
puts "Emailing #{Publisher.count} users" | ||
|
||
Publisher.order(:id).find_each.with_index do |user, index| | ||
begin | ||
PublisherMailer.update_to_tos(user).deliver_now | ||
print '.' if index % 1000 == 0 | ||
rescue | ||
# Let's rescue all exceptions | ||
print "X" | ||
Rails.logger.info "[#{Time.now.iso8601}] Could not send terms and conditions for [#{user.id}]" | ||
end | ||
end | ||
|
||
puts | ||
puts "✨ Done" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters