Skip to content

Commit

Permalink
fix duration ingestion to use milliseconds, not seconds (#7839)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaher committed Oct 16, 2023
1 parent 8c6c4da commit d48b534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions treeherder/log_parser/failureline.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ def create_group_result(job_log, line):
else:
group, _ = Group.objects.get_or_create(name=group_path[:255])
duration = int(line.get('duration', 0))
# duration > 4 hours or negative, something is wrong
if duration > 4 * 3600 or duration < 0:
# duration > 2 hours (milliseconds) or negative, something is wrong
if duration > 7200 * 1000 or duration < 0:
duration = 0
duration = int(duration / 1000)
GroupStatus.objects.create(
job_log=job_log,
group=group,
Expand Down

0 comments on commit d48b534

Please sign in to comment.