[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Sun Nov 14 17:37:39 MST 2010


The branch, master has been updated
       via  6a85d8c Support passing timeout to the StormCachingBuildFarm.
      from  aca1062 Cope with revision info not being present when displaying items in the web view.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6a85d8c6cada716c6f15ade8d0120054506dc261
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Nov 15 01:37:13 2010 +0100

    Support passing timeout to the StormCachingBuildFarm.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/sqldb.py    |   13 +++++++------
 import-and-analyse.py |    2 +-
 mail-dead-hosts.py    |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/sqldb.py b/buildfarm/sqldb.py
index 709784f..faf3cbf 100644
--- a/buildfarm/sqldb.py
+++ b/buildfarm/sqldb.py
@@ -199,18 +199,19 @@ class StormCachingBuildResultStore(BuildResultStore):
 
 class StormCachingBuildFarm(BuildFarm):
 
-    def __init__(self, path=None, store=None):
+    def __init__(self, path=None, store=None, timeout=0.5):
+        self.timeout = timeout
         self.store = store
         super(StormCachingBuildFarm, self).__init__(path)
 
     def _get_store(self):
         if self.store is not None:
             return self.store
-        else:
-            db = create_database("sqlite:" + os.path.join(self.path, "hostdb.sqlite"))
-            self.store = Store(db)
-            setup_schema(self.store)
-            return self.store
+        db_path = os.path.join(self.path, "hostdb.sqlite")
+        db = create_database("sqlite:%s?timeout=%f" % (db_path, self.timeout))
+        self.store = Store(db)
+        setup_schema(self.store)
+        return self.store
 
     def _open_hostdb(self):
         return StormHostDatabase(self._get_store())
diff --git a/import-and-analyse.py b/import-and-analyse.py
index d88ef43..f6f0c2c 100755
--- a/import-and-analyse.py
+++ b/import-and-analyse.py
@@ -23,7 +23,7 @@ parser.add_option("--verbose", help="Be verbose", action="count")
 
 (opts, args) = parser.parse_args()
 
-buildfarm = StormCachingBuildFarm()
+buildfarm = StormCachingBuildFarm(timeout=40.0)
 
 smtp = smtplib.SMTP()
 smtp.connect()
diff --git a/mail-dead-hosts.py b/mail-dead-hosts.py
index 8300ba0..2e0c7f7 100755
--- a/mail-dead-hosts.py
+++ b/mail-dead-hosts.py
@@ -27,7 +27,7 @@ parser = optparse.OptionParser()
 parser.add_option("--dry-run", help="Don't actually send any emails.", action="store_true")
 (opts, args) = parser.parse_args()
 
-buildfarm = StormCachingBuildFarm()
+buildfarm = StormCachingBuildFarm(timeout=40.0)
 db = buildfarm.hostdb
 
 smtp = smtplib.SMTP()


-- 
build.samba.org


More information about the samba-cvs mailing list