diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2012-07-09 20:32:38 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-07-16 08:50:53 (GMT) |
commit | 2fba1dd539edacb5754e7819099820c79ea9272f (patch) | |
tree | a271f3c174a29d4442d05f4d02590712e8dc5a7f | |
parent | bdd0d88c6f2747f80a572136ba131f6d66ca370e (diff) |
Pootle notification: don't time out on git interactionformer
Pootle notification is a non-interactive process, so it doesn't need
to time out like interactive requests do (because the user isn't not
going to be interested in the result if it takes too long). It's not
possible to give a single number that's correct most of the time, so
let's just deactivate the timeout. If git would go haywire for some
reason, we'd notice it using different means (e.g. Munin).
-rw-r--r-- | lib/emailer.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/emailer.rb b/lib/emailer.rb index a98cb2e..8e56c50 100644 --- a/lib/emailer.rb +++ b/lib/emailer.rb @@ -25,7 +25,10 @@ module Emailer author = event.commit_details[:commit_author] begin - files = repository.git.commit(sha).diffs.map {|i| i.a_path} + files = [] + Grit::Git.with_timeout(0) do + files += repository.git.commit(sha).diffs.map {|i| i.a_path} + end langs = files.collect {|i| next unless i =~ /^po\/(.*).po$/; $1}.compact.join(', ') rescue Exception => e logger.warn("Failed to get git diff to compose poole commit files: #{e}") |