-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #14 [BuildQueue] fixed get_eta
- Loading branch information
1 parent
9226519
commit 53bf5c9
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright (c) 2012 Kannan Manickam <[email protected]> | ||
# Copyright (c) 2013 Kannan Manickam <[email protected]> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -108,9 +108,8 @@ def get_eta(task_name) | |
eta = nil | ||
details = get_details(task_name) | ||
unless details.empty? | ||
eta = Time.now - Time.at( | ||
details["buildableStartMilliseconds"].to_i/1000 | ||
) if details["buildableStartMilliseconds"] | ||
matched = details["why"].match(/.*\(ETA:(.*)\)/) | ||
eta = matched[1].strip unless matched.nil? | ||
end | ||
eta | ||
end | ||
|