src/main/java/org/embulk/input/marketo/delegate/ActivityBulkExtractInputPlugin.java in embulk-input-marketo-0.5.7.alpha.4 vs src/main/java/org/embulk/input/marketo/delegate/ActivityBulkExtractInputPlugin.java in embulk-input-marketo-0.5.7.alpha.5

- old
+ new

@@ -35,11 +35,11 @@ @Override protected InputStream getExtractedStream(PluginTask task, Schema schema) { try (MarketoRestClient marketoRestClient = createMarketoRestClient(task)) { MarketoService marketoService = new MarketoServiceImpl(marketoRestClient); - Date fromDate = task.getFromDate().orNull(); - return new FileInputStream(marketoService.extractAllActivity(fromDate, MarketoUtils.addDate(fromDate, task.getFetchDays()), task.getPollingIntervalSecond(), task.getBulkJobTimeoutSecond())); + Date fromDate = task.getFromDate(); + return new FileInputStream(marketoService.extractAllActivity(fromDate, task.getToDate().get(), task.getPollingIntervalSecond(), task.getBulkJobTimeoutSecond())); } catch (FileNotFoundException e) { LOGGER.error("Exception when trying to extract activity", e); throw new DataException("Error when trying to extract activity"); }