Adding support for autopause and modifying the update status monitor to automatically multiply values below a second by a second.

This commit is contained in:
Renan DelValle 2019-03-14 14:58:30 -07:00
parent 68c27fee13
commit 826fa6acde
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
4 changed files with 148 additions and 0 deletions

View file

@ -64,6 +64,15 @@ func (m *Monitor) JobUpdateStatus(updateKey aurora.JobUpdateKey,
interval time.Duration,
timeout time.Duration) (aurora.JobUpdateStatus, error) {
// Minimal unit is the second, if it's below a second, multiply input by seconds
if interval < 1 * time.Second {
interval *= time.Second
}
if timeout < 1 * time.Second {
timeout *= time.Second
}
updateQ := aurora.JobUpdateQuery{
Key: &updateKey,
Limit: 1,