From 87e0bb3dd2918ea6f88eaedb317ba4def3cbc6f4 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Wed, 17 Jun 2020 16:09:05 +0200 Subject: [PATCH] Fix service polling --- .../connect/rest/fitbit/user/ServiceUserRepository.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kafka-connect-fitbit-source/src/main/java/org/radarbase/connect/rest/fitbit/user/ServiceUserRepository.java b/kafka-connect-fitbit-source/src/main/java/org/radarbase/connect/rest/fitbit/user/ServiceUserRepository.java index 0f463bb5..63318a44 100644 --- a/kafka-connect-fitbit-source/src/main/java/org/radarbase/connect/rest/fitbit/user/ServiceUserRepository.java +++ b/kafka-connect-fitbit-source/src/main/java/org/radarbase/connect/rest/fitbit/user/ServiceUserRepository.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.databind.ObjectReader; import io.confluent.common.config.ConfigException; import java.io.IOException; -import java.net.MalformedURLException; import java.net.URL; import java.time.Duration; import java.time.Instant; @@ -45,7 +44,6 @@ import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; -import org.apache.kafka.connect.errors.ConnectException; import org.radarbase.connect.rest.RestSourceConnectorConfig; import org.radarbase.connect.rest.fitbit.FitbitRestSourceConnectorConfig; import org.radarcns.exception.TokenException; @@ -113,7 +111,7 @@ public void initialize(RestSourceConnectorConfig config) { @Override public Stream stream() { - if (nextFetch.get().equals(Instant.MIN)) { + if (nextFetch.get().equals(MIN_INSTANT)) { try { applyPendingUpdates(); } catch (IOException ex) {