use of com.haulmont.cuba.core.global.RunTaskOnceException in project cuba by cuba-platform.
the class Scheduling method runOnce.
@Override
public void runOnce(ScheduledTask task) {
UserSession userSession;
try {
userSession = getUserSession(task);
} catch (LoginException e) {
throw new RuntimeException("Unable to obtain user session", e);
}
Integer priority = getServerPriority(task, serverInfo.getServerId());
if (priority == null) {
throw new RunTaskOnceException(task.toString());
}
lastStartCache.put(task, timeSource.currentTimeMillis());
runner.runTaskOnce(task, timeSource.currentTimeMillis(), userSession);
}
Aggregations