/** {@inheritDoc} */ @Override public NodeBasedContext doSomeWork(NodeBasedContext lastContext, GraphDatabaseService database) { initializeSelectorIfNeeded(lastContext, database); Node node = determineNextNode(database); if (node == null) { LOG.warn( "RecommendationModule did not find a node to continue with. There are no nodes matching the configuration."); return lastContext; } LOG.info("Computing for " + node.getId()); List<Recommendation<Node>> recommendations = config.getEngine().recommend(node, config.getConfig()); persistRecommendations(node, recommendations); return new NodeBasedContext(node); }