use of org.exoplatform.services.scheduler.Task in project kernel by exoplatform.
the class QueueTaskJob method execute.
public void execute(JobContext context) throws Exception {
PortalContainer manager = PortalContainer.getInstance();
QueueTasks qtasks = (QueueTasks) manager.getComponentInstanceOfType(QueueTasks.class);
Task task = qtasks.poll();
while (task != null) {
try {
task.execute();
} catch (Exception ex) {
LOG.error(ex.getLocalizedMessage(), ex);
}
task = qtasks.poll();
}
}
Aggregations