[Commits] (heikki) Make sure that we sleep 5 minutes after each
build before starting the next,
in the hopes that tinderbox main page would report more accurately
which build picked up which changes. Previously we were just
making sure that the time between starting builds was greater
than 5 minutes, and happened only when the builds failed early.
commits at osafoundation.org
commits at osafoundation.org
Fri Sep 10 15:23:58 PDT 2004
Commit by: heikki
Modified files:
hardhat/cycle.py 1.4 1.5
Log message:
Make sure that we sleep 5 minutes after each build before starting the next, in the hopes that tinderbox main page would report more accurately which build picked up which changes. Previously we were just making sure that the time between starting builds was greater than 5 minutes, and happened only when the builds failed early.
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/hardhat/cycle.py.diff?r1=text&tr1=1.4&r2=text&tr2=1.5
Index: hardhat/cycle.py
diff -u hardhat/cycle.py:1.4 hardhat/cycle.py:1.5
--- hardhat/cycle.py:1.4 Wed Jun 9 11:41:50 2004
+++ hardhat/cycle.py Fri Sep 10 15:23:57 2004
@@ -46,38 +46,26 @@
if alertAddr.find('@') == -1:
alertAddr += "@" + defaultDomain
-# print "options ", options
-# print " Build script ", options.doScript
-# print "args ", args[0]
-
- prevStartInt = 0
curDir = os.path.abspath(os.getcwd())
path = os.environ.get('PATH', os.environ.get('path'))
cvsProgram = hardhatutil.findInPath(path, "cvs")
-# print "cvs =", cvsProgram
-
- go = 1
- # Main loop
if os.path.exists(stopFile):
os.remove(stopFile)
+ go = 1
+ firstRound = 1
+
while go:
os.chdir(curDir)
- startInt = int(time.time())
-
- if ((startInt - (5 * 60)) < prevStartInt):
+ if not firstRound:
print "Sleeping 5 minutes (" + buildName + ")"
time.sleep(5 * 60)
- # re-fetch start time now that we've slept
- startInt = int(time.time())
nowString = time.strftime("%Y-%m-%d %H:%M:%S")
- startTime = str(startInt)
- prevStartInt = startInt
# check CVS for any new hardhat script
try:
@@ -87,7 +75,6 @@
hardhatutil.dumpOutputList(outputList)
except:
raise TinderbuildError, "Error updating HardHat"
-
try:
# launch the real build script
@@ -104,8 +91,11 @@
if os.path.exists(stopFile):
go = 0
+ firstRound = 0
+
+
class TinderbuildError(Exception):
def __init__(self, args=None):
self.args = args
-main()
\ No newline at end of file
+main()
More information about the Commits
mailing list