monwork - add missing continues

This can lead to longer run times than necessary.
This commit is contained in:
Gibheer 2018-12-13 15:37:03 +01:00
parent e151f056ad
commit 82e582f022

View File

@ -74,6 +74,7 @@ func startNodeGen(db *sql.DB, checkInterval time.Duration) {
log.Printf("could not update nodes: %s", err) log.Printf("could not update nodes: %s", err)
tx.Rollback() tx.Rollback()
time.Sleep(checkInterval) time.Sleep(checkInterval)
continue
} }
if err := tx.Commit(); err != nil { if err := tx.Commit(); err != nil {
log.Printf("could not commit node updates: %s", err) log.Printf("could not commit node updates: %s", err)
@ -100,6 +101,7 @@ func startCommandGen(db *sql.DB, checkInterval time.Duration) {
log.Printf("could not update checks: %s", err) log.Printf("could not update checks: %s", err)
tx.Rollback() tx.Rollback()
time.Sleep(checkInterval) time.Sleep(checkInterval)
continue
} }
if err := tx.Commit(); err != nil { if err := tx.Commit(); err != nil {
log.Printf("could not commit command updates: %s", err) log.Printf("could not commit command updates: %s", err)