Sha256: 18dd060ca936fdac33a9847bfd07729dde6bbee07caa29bf40d155fab347f88d
Contents?: true
Size: 750 Bytes
Versions: 29
Compression:
Stored size: 750 Bytes
Contents
namespace :effective_cpd do # bundle exec rake effective_cpd:seed task seed: :environment do load "#{__dir__}/../../db/seeds.rb" end # bundle exec rake effective_cpd:notify_auditees desc 'Send cpd_audit_opened email notifications for effective cpd' task notify_auditees: :environment do audits = EffectiveCpd.CpdAudit.opened.sorted audits.find_each do |audit| begin audit.notify! puts "Sent #{audit} notification to #{audit.user.email}" rescue => e if defined?(ExceptionNotifier) ExceptionNotifier.notify_exception(e, data: { audit_id: audit.id }) end puts "Error with audit #{auditee.id}: #{e.errors.inspect}" end end puts 'All done' end end
Version data entries
29 entries across 29 versions & 1 rubygems