Move resource limiting to import-and-analyse script itself.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 24 Nov 2010 11:28:12 +0000 (12:28 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 24 Nov 2010 11:28:12 +0000 (12:28 +0100)
import-and-analyse.py
revs.sh [deleted file]

index 758707a..39ab3a8 100755 (executable)
@@ -19,6 +19,7 @@ from buildfarm.web import build_uri
 from email.mime.text import MIMEText
 import logging
 import optparse
+import resource
 import smtplib
 
 parser = optparse.OptionParser("import-and-analyse [options]")
@@ -27,6 +28,9 @@ parser.add_option("--verbose", help="Be verbose", action="count")
 
 (opts, args) = parser.parse_args()
 
+resource.setrlimit(resource.RLIMIT_RSS, (300000, 300000))
+resource.setrlimit(resource.RLIMIT_DATA, (300000, 300000))
+
 buildfarm = StormCachingBuildFarm(timeout=40.0)
 
 smtp = smtplib.SMTP()
diff --git a/revs.sh b/revs.sh
deleted file mode 100755 (executable)
index e8733d9..0000000
--- a/revs.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-export PATH=$PATH:/usr/local/bin
-
-ulimit -v 300000
-ulimit -m 300000
-
-./import-and-analyse.py