...
 
Commits (2)
image: openjdk:8-jdk
image: openjdk:11-jdk
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
......
......@@ -31,15 +31,15 @@ public class TwitterService {
twitterDAO.open(accountProperties);
Optional<Date> lastRT = twitterDAO.getLastRetweetTime();
log.info(" Last retweet by {} is at {}", accountName, lastRT);
log.debug(" Last retweet by {} is at {}", accountName, lastRT);
for (String handle : retweetProperties.getUsers()) {
log.info(" Considering re-tweeting {}", handle);
log.debug(" Considering re-tweeting {}", handle);
Optional<TweetEntity> optionalTweet = twitterDAO.getMostRecentMessage(handle);
if (!optionalTweet.isPresent()) {
log.info(" No tweet found");
log.debug(" No tweet found");
continue;
}
......@@ -47,17 +47,17 @@ public class TwitterService {
List<String> keywords = retweetProperties.getKeywords();
if (!filterAccepts(tweet, keywords)) {
log.info(" Tweet does not match keywords {}", keywords);
if (!acceptableDates(lastRT, tweet)) {
log.debug(" Tweet is older than my last message.");
continue;
}
if (!acceptableDates(lastRT, tweet)) {
log.info(" Tweet is older than my last message.");
if (!filterAccepts(tweet, keywords)) {
log.debug(" Tweet does not match keywords {}", keywords);
continue;
}
log.info(" Re-tweeting tweet from {} created at {}", handle, tweet.getCreatedAt());
log.info("Re-tweeting tweet from {} created at {}", handle, tweet.getCreatedAt());
twitterDAO.reTeweet(tweet.getId());
}
} finally {
......