Skip to content

@hinke /Email worker
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Our worker task for emails
desc 'Work email queue'
task :emails => :environment do
`if [ ! -d "pids" ]; then mkdir pids; fi; echo "#{Process.pid}" > #{Rails.root}/pids/emails.pid`
Minion.job "emails" do |args|
logger.info "[#{Time.now}] Recieved queued item"
begin
UserMailer.deliver(args)
rescue Exception => exception
logger.info "Error, #{exception}"
raise exception
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.