SourceInstance instance, List<Pair<Long, Long>> intervals,
@Nullable ImportSettings autoImportSettings) {
log.info("intervals=" + intervals + ", settings=" + autoImportSettings);
ImmutableList.Builder<ImportTaskPayload> accu = ImmutableList.builder();
for (Pair<Long, Long> interval : intervals) {
FindRemoteWavesTask task = new FindRemoteWavesTaskGsonImpl();
task.setInstance(instance.serialize());
task.setOnOrAfterDays(interval.getFirst());
task.setBeforeDays(interval.getSecond());
if (autoImportSettings != null) {
task.setAutoImportSettings(autoImportSettings);
}
ImportTaskPayload payload = new ImportTaskPayloadGsonImpl();
payload.setFindWavesTask(task);
accu.add(payload);
}