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:
parent
5f1582ff50
commit
b50188273a
4 changed files with 148 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue