From 40bfb44da55f134e3525c48d5b98c7f096f01061 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 4 Sep 2013 11:11:28 +0100 Subject: Add a timeout to document conversion with wvtext - it can hang. --- lib/mail_handler/mail_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mail_handler/mail_handler.rb') diff --git a/lib/mail_handler/mail_handler.rb b/lib/mail_handler/mail_handler.rb index 9c955cccd..918f91180 100644 --- a/lib/mail_handler/mail_handler.rb +++ b/lib/mail_handler/mail_handler.rb @@ -81,7 +81,7 @@ module MailHandler default_params = { :append_to => text, :binary_output => false } if content_type == 'application/vnd.ms-word' AlaveteliExternalCommand.run("wvText", tempfile.path, tempfile.path + ".txt", - { :memory_limit => 536870912 } ) + { :memory_limit => 536870912, :timeout => 120 } ) # Try catdoc if we get into trouble (e.g. for InfoRequestEvent 2701) if not File.exists?(tempfile.path + ".txt") AlaveteliExternalCommand.run("catdoc", tempfile.path, default_params) -- cgit v1.2.3