in my app, DJ fires off a an email but for some reason I see the email in the log file twice though it is sent only once? I confirmed in the logs that DJ runs only once and user_mailer runs only once. So why do I see the email twice in the log file? What is Rails doing?
Rendered user_mailer/room_notification.text.erb (0.9ms)
Sent mail to rachela.xxxxxxx@gmail.com (1097ms)
Date: Fri, 30 Sep 2011 13:34:56 -0700
From: "roomxcom" <no-reply@roomxcom>
To: rachela.xxxxxxx@gmail.com
Message-ID: <123@-MacBook-Pro.local.mail>
Subject: [Email Testing] Test 12
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
AAAAA Did something:
Test 12
http://localhost:3000/c19
Sent mail to rachela.xxxxxxx@gmail.com (3510ms)
Date: Fri, 30 Sep 2011 13:34:56 -0700
From: "roomxcom" <no-reply@roomxcom>
To: rachela.xxxxxxx@gmail.com
Message-ID: <123@-MacBook-Pro.local.mail>
Subject: [Email Testing] Test 12
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
AAAAA Did something:
Test 12
http://localhost:3000/c19
SQL (0.1ms) BEGIN
AREL (0.3ms) DELETE FROM "delayed_jobs" WHERE "delayed_jobs"."id" = 25
SQL (0.4ms) COMMIT
Delayed Job:
UserMailer.delay.room_notification(room, record.user, room_member.user, record.item)
User Mailer:
def room_notification(room, user_creator, user_recipient, item)
...
mail( :from => "XXXX <no-reply@XXXXXXXXXX.com>",
:to => user_recipient.email,
:subject => "[#{@room.title}] #{@item.title}"
).deliver
Any idea what' going on and why rails is showing the email in the log twice? Thanks