Skip to content

Commit

Permalink
#34 - fixing lost scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
BGehrels committed May 23, 2017
1 parent d513e28 commit fda37a2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.zalando.fahrschein.NakadiClient;
import org.zalando.nakadiproducer.eventlog.EventLogWriter;
import org.zalando.nakadiproducer.eventlog.impl.EventLogRepository;
Expand Down Expand Up @@ -167,6 +168,11 @@ public EventTransmissionService eventTransmissionService(EventLogRepository even
return new EventTransmissionService(eventLogRepository, nakadiPublishingClient, objectMapper);
}

@Scheduled(fixedDelayString = "${nakadi-producer.transmission-polling-delay:1000}")
protected void sendEventsIfSchedulingEnabled(EventTransmitter eventTransmitter) {
eventTransmitter.sendEvents();
}

@PostConstruct
public void migrateFlyway() {
Flyway flyway = new Flyway();
Expand Down

0 comments on commit fda37a2

Please sign in to comment.