use of org.olat.core.commons.services.taskexecutor.LongRunnable in project OpenOLAT by OpenOLAT.
the class TaskExecutorManagerImpl method execute.
@Override
public void execute(Runnable task) {
// wrap call to the task here to catch all errors that are may not catched yet in the task itself
// like outOfMemory or other system errors.
Task persistentTask = null;
if (task instanceof LongRunnable) {
persistentTask = persistentTaskDao.createTask(UUID.randomUUID().toString(), (LongRunnable) task);
dbInstance.commit();
} else {
execute(task, persistentTask, (task instanceof Sequential));
}
}
use of org.olat.core.commons.services.taskexecutor.LongRunnable in project openolat by klemens.
the class TaskExecutorManagerImpl method execute.
@Override
public void execute(Runnable task) {
// wrap call to the task here to catch all errors that are may not catched yet in the task itself
// like outOfMemory or other system errors.
Task persistentTask = null;
if (task instanceof LongRunnable) {
persistentTask = persistentTaskDao.createTask(UUID.randomUUID().toString(), (LongRunnable) task);
dbInstance.commit();
} else {
execute(task, persistentTask, (task instanceof Sequential));
}
}
Aggregations