Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

For in-progress builds, estimate the duration

We do this by taking the current time of the Trac host for the
intermediate "completed" timestamp, which is OK as far as the
Trac host and the Hudson host clocks are synchronized.
  • Loading branch information...
commit c5228020a5db07b2a907bb9925c2c5da38ae0ea8 1 parent e17bc42
Christian Boos authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 HudsonTrac/HudsonTracPlugin.py
15 HudsonTrac/HudsonTracPlugin.py
View
@@ -186,18 +186,23 @@ def get_number(parent, child):
for entry in info.documentElement.getElementsByTagName("build"):
# ignore builds that are still running
Christian Boos Owner
cboos added a note

s/ignore/eventually ignore/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
if get_string(entry, 'building') == 'true':
- if not self.display_building:
- continue
- else:
+ if self.display_building:
result = 'INPROGRESS'
+ else:
+ continue
else:
result = get_string(entry, 'result')
# create timeline entry
started = get_number(entry, 'timestamp')
- completed = started + get_number(entry, 'duration')
+ if result == 'INPROGRESS':
Christian Boos Owner
cboos added a note

maybe have an option to turn this off, in case clocks are really not the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ # we hope the clocks are close...
+ completed = time.time()
+ else:
+ duration = get_number(entry, 'duration')
+ completed = started + duration
+ completed /= 1000
started /= 1000
- completed /= 1000
message, kind = {
'SUCCESS': ('Build finished successfully',

1 comment on commit c522802

Christian Boos

maybe have an option to turn this off, in case clocks are really not the same?

Christian Boos

s/ignore/eventually ignore/

Christian Boos
Owner

note that these are just random comments to try out how #2035 works here...

Please sign in to comment.
Something went wrong with that request. Please try again.