This file contains hidden or 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
#!/usr/bin/env python | |
# http://www.rabbitmq.com/tutorials/tutorial-two-python.html | |
import pika | |
import sys | |
connection = pika.BlockingConnection(pika.ConnectionParameters( | |
host='localhost')) | |
channel = connection.channel() | |
message = ' '.join(sys.argv[1:]) or "Hello World!" |
This file contains hidden or 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
class QueueDeliveryMailer < ActionMailer::Base | |
self.delivery_method = Rails.application.config.mail_queue_outbound_delivery_method #remember this from development.rb | |
layout nil | |
def rebuild_mail(id) | |
mail({:from => $redis.get("mail:#{id}:sender_address"), | |
:to => $redis.get("mail:#{id}:recipient_address"), | |
:reply_to => $redis.get("mail:#{id}:reply_to_address"), | |
:mime_version => $redis.get("mail:#{id}:mime_version"), | |
:content_type => $redis.get("mail:#{id}:content_type"), |