jcr->JobId = jcr->jr.JobId;
ASSERT(jcr->jr.JobId > 0);
- Dmsg4(30, "Created job record JobId=%d Name=%s Type=%c Level=%c\n",
+ Dmsg4(50, "Created job record JobId=%d Name=%s Type=%c Level=%c\n",
jcr->JobId, jcr->Job, jcr->jr.Type, jcr->jr.Level);
Dmsg0(200, "Add jrc to work queue\n");
}
#endif
#endif
- Dmsg0(200, "Done run_job()\n");
+ Dmsg0(100, "Done run_job()\n");
}
/*
jcr->JobStatus = JS_Created; /* force new status */
dird_free_jcr(jcr); /* partial cleanup old stuff */
if (jcr->JobBytes == 0) {
+ Dmsg1(100, "Requeue job=%d\n", jcr->JobId);
+ V(jq->mutex);
jobq_add(jq, jcr); /* queue the job to run again */
+ P(jq->mutex);
free(je); /* free the job entry */
continue;
}
njcr->pool = jcr->pool;
njcr->store = jcr->store;
njcr->messages = jcr->messages;
+ Dmsg0(100, "Call to run new job\n");
+ V(jq->mutex);
run_job(njcr);
+ P(jq->mutex);
+ Dmsg0(100, "Back from running new job.\n");
}
/* Clean up and release old jcr */
if (jcr->db) {
- Dmsg0(200, "Close DB\n");
+ Dmsg0(100, "Close DB\n");
db_close_database(jcr, jcr->db);
jcr->db = NULL;
}
+ Dmsg1(100, "====== Termination job=%d\n", jcr->JobId);
free_jcr(jcr);
free(je); /* release job entry */
}