use of org.structr.feed.entity.DataFeed in project structr by structr.
the class UpdateFeedAgent method processTask.
@Override
public ReturnValue processTask(final Task<T> task) throws Throwable {
logger.debug("Processing task {}", task.getClass().getName());
final App app = StructrApp.getInstance();
try (final Tx tx = app.tx(true, true, false)) {
for (DataFeed feed : task.getWorkObjects()) {
logger.debug("Updating data feed {} if due", feed.getProperty(DataFeed.name));
feed.updateIfDue();
}
tx.success();
}
return ReturnValue.Success;
}
Aggregations