summaryrefslogtreecommitdiff
path: root/src/main/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/Main.java')
-rw-r--r--src/main/Main.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/Main.java b/src/main/Main.java
index e7fc372..43e5619 100644
--- a/src/main/Main.java
+++ b/src/main/Main.java
@@ -111,7 +111,9 @@ public class Main implements Callable<Boolean> {
private boolean tweetsToDb(ITweetReader reader) throws IOException {
Tweet tweet = null;
tweetNo = 1;
+ System.err.println("Trying to establish DB connection...");
try (Connection connection = cb.create()) {
+ System.err.println("Connected, starting to read tweets.");
/* create the object that fills the database */
DataFiller filler = new DataFiller(connection);
while ((tweet = reader.getTweet()) != null) {
@@ -137,7 +139,7 @@ public class Main implements Callable<Boolean> {
public int getProcessedTweets() {
// tweetNo is the tweet number of the tweet that is being processed.
- return Math.min(0, tweetNo - 1);
+ return Math.max(0, tweetNo - 1);
}
@Override