Skip to content

Commit

Permalink
Explicitly order by JobId for rerun.
Browse files Browse the repository at this point in the history
We should rerun jobs in the order the JobIds are arranged so explicitly
order the JobIds we select.
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 2b005f8 commit 8085e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dird/ua_run.c
Expand Up @@ -209,10 +209,10 @@ int rerun_cmd(UAContext *ua, const char *cmd)
strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);

if (since_jobid_given) {
Mmsg(query, "SELECT JobId FROM Job WHERE JobStatus = 'f' AND JobId >= %s",
Mmsg(query, "SELECT JobId FROM Job WHERE JobStatus = 'f' AND JobId >= %s ORDER BY JobId",
edit_int64(since_jobid, ed1));
} else {
Mmsg(query, "SELECT JobId FROM Job WHERE JobStatus = 'f' AND SchedTime > '%s'", dt);
Mmsg(query, "SELECT JobId FROM Job WHERE JobStatus = 'f' AND SchedTime > '%s' ORDER BY JobId", dt);
}

db_get_query_dbids(ua->jcr, ua->db, query, ids);
Expand Down

0 comments on commit 8085e55

Please sign in to comment.