Search in sources :

Example 1 with CancelJobJob

use of org.candlepin.pinsetter.tasks.CancelJobJob in project candlepin by candlepin.

the class PinsetterKernel method unpauseScheduler.

public void unpauseScheduler() throws PinsetterException {
    log.debug("looking for canceled jobs since scheduler was paused");
    CancelJobJob cjj = new CancelJobJob(jobCurator, this);
    try {
        // Not sure why we don't want to use a UnitOfWork here
        cjj.toExecute(null);
    } catch (JobExecutionException e1) {
        throw new PinsetterException("Could not clear canceled jobs before starting");
    }
    log.debug("restarting scheduler");
    try {
        scheduler.start();
    } catch (SchedulerException e) {
        throw new PinsetterException("There was a problem unpausing the scheduler", e);
    }
}
Also used : JobExecutionException(org.quartz.JobExecutionException) SchedulerException(org.quartz.SchedulerException) CancelJobJob(org.candlepin.pinsetter.tasks.CancelJobJob)

Aggregations

CancelJobJob (org.candlepin.pinsetter.tasks.CancelJobJob)1 JobExecutionException (org.quartz.JobExecutionException)1 SchedulerException (org.quartz.SchedulerException)1