From 1fcdae0636749e001dc9dab313d2439e8d80cf02 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 20 Feb 2011 15:39:14 +0100 Subject: [PATCH] Restart incomplete jobs only if type Backup --- bacula/src/dird/jobq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bacula/src/dird/jobq.c b/bacula/src/dird/jobq.c index 97917b676b..7ceeb86f3e 100644 --- a/bacula/src/dird/jobq.c +++ b/bacula/src/dird/jobq.c @@ -616,17 +616,18 @@ static bool reschedule_job(JCR *jcr, jobq_t *jq, jobq_item_t *je) /* * Reschedule the job if requested and possible */ - /* Basic condition is that more times remain */ + /* Basic condition is that more reschedule times remain */ if (jcr->job->RescheduleTimes == 0 || jcr->reschedule_count < jcr->job->RescheduleTimes) { resched = /* Check for incomplete jobs */ - (jcr->job->RescheduleIncompleteJobs && jcr->is_incomplete()) || + (jcr->job->RescheduleIncompleteJobs && + jcr->is_incomplete() && jcr->is_JobType(JT_BACKUP)) || /* Check for failed jobs */ (jcr->job->RescheduleOnError && - jcr->JobStatus != JS_Terminated && - jcr->JobStatus != JS_Canceled && - jcr->getJobType() == JT_BACKUP); + !jcr->is_JobStatus(JS_Terminated) && + !jcr->is_JobStatus(JS_Canceled) && + jcr->is_JobType(JT_BACKUP)); } if (resched) { char dt[50], dt2[50]; -- 2.39.5