Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Our worker task for emails

View Email worker
1 2 3 4 5 6 7 8 9 10 11 12 13
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.