Search in sources :

Example 1 with WorkspaceQueryService

use of org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceQueryService in project ddf by codice.

the class QueryJob method execute.

@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
    LOGGER.trace("Calling execute");
    LOCK.lock();
    try {
        SchedulerContext schedulerContext = jobExecutionContext.getScheduler().getContext();
        WorkspaceQueryService workspaceQueryService = (WorkspaceQueryService) schedulerContext.get(WorkspaceQueryServiceImpl.JOB_IDENTITY);
        workspaceQueryService.run();
    } catch (SchedulerException e) {
        LOGGER.warn("Could not get Scheduler Context.  The job will not run", e);
    } finally {
        LOCK.unlock();
    }
}
Also used : WorkspaceQueryService(org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceQueryService) SchedulerException(org.quartz.SchedulerException) SchedulerContext(org.quartz.SchedulerContext)

Aggregations

WorkspaceQueryService (org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceQueryService)1 SchedulerContext (org.quartz.SchedulerContext)1 SchedulerException (org.quartz.SchedulerException)1