commit 455f28fac6a436aa436402a817b20b7397e45359
parent b42424360a456b73869c416b8bab42bb6a237fb0
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Sun, 11 Aug 2013 11:54:40 +0200
Merge #121
Diffstat:
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/lib/sup/modes/edit_message_mode.rb b/lib/sup/modes/edit_message_mode.rb
@@ -484,10 +484,10 @@ protected
m = build_message date
if HookManager.enabled? "sendmail"
- if not HookManager.run "sendmail", :message => m, :account => acct
- warn "Sendmail hook was not successful"
- return false
- end
+ if not HookManager.run "sendmail", :message => m, :account => acct
+ warn "Sendmail hook was not successful"
+ return false
+ end
else
IO.popen(acct.sendmail, "w") { |p| p.puts m }
raise SendmailCommandFailed, "Couldn't execute #{acct.sendmail}" unless $? == 0
diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb
@@ -25,11 +25,13 @@ class SentManager
end
def write_sent_message date, from_email, &block
- debug "store the sent message (locking sent source..)"
- @source.poll_lock.synchronize do
- @source.store_message date, from_email, &block
+ ::Thread.new do
+ debug "store the sent message (locking sent source..)"
+ @source.poll_lock.synchronize do
+ @source.store_message date, from_email, &block
+ end
+ PollManager.poll_from @source
end
- PollManager.poll_from @source
end
end