Source:
public void scheduleTasks() { RadioPlayerGenreElementCreator genreCreator = new RadioPlayerGenreElementCreator( new RadioPlayerIdGenreMap(RadioPlayerIdGenreMap.GENRES_FILE, NITRO_ID_GENRE_PREFIX)); RadioPlayerFeedCompiler.init(scheduleResolver, knownTypeContentResolver, contentResolver, channelResolver, NITRO, genreCreator); if (!httpsRemoteServices().isEmpty()) { createHealthProbes(httpsRemoteServices(), httpsUploadServices()); if (Boolean.parseBoolean(s3HttpsUpload) || Boolean.parseBoolean(httpsUpload)) { scheduler.schedule( radioPlayerHttpsUploadTaskBuilder().newScheduledPiTask(httpsUploadServices(), dayRangeGenerator).withName("Radioplayer HTTPS PI Full Upload"), UPLOAD_EVERY_TWO_HOURS); scheduler.schedule( radioPlayerHttpsUploadTaskBuilder().newScheduledPiTask(httpsUploadServices(), new DayRangeGenerator()).withName("Radioplayer HTTPS PI Today Upload"), UPLOAD_EVERY_THIRTY_MINUTES); scheduler.schedule( new RadioPlayerHttpsRemoteProcessingChecker(radioPlayerHttpClient(), httpsServiceId, uploadResultRecorder(), log).withName("Radioplayer HTTPS Remote Processing Checker"), UPLOAD_EVERY_FIVE_MINUTES.withOffset(Duration.standardMinutes(5))); scheduler.schedule( radioPlayerHttpsUploadTaskBuilder().newScheduledOdTask(httpsUploadServices(), true).withName("Radioplayer HTTPS OD Full Upload"), NEVER); scheduler.schedule( radioPlayerHttpsUploadTaskBuilder().newScheduledOdTask(httpsUploadServices(), false).withName("Radioplayer HTTPS OD Today Upload"), UPLOAD_EVERY_THIRTY_MINUTES); } if (!Boolean.parseBoolean(httpsUpload) && !Boolean.parseBoolean(s3HttpsUpload)) { log.record( new AdapterLogEntry(Severity.INFO) .withSource(getClass()) .withDescription("Not installing Radioplayer uploader") ); } } }

Target:
public void scheduleTasks() { RadioPlayerGenreElementCreator genreCreator = new RadioPlayerGenreElementCreator( new RadioPlayerIdGenreMap(RadioPlayerIdGenreMap.GENRES_FILE, NITRO_ID_GENRE_PREFIX)); RadioPlayerFeedCompiler.init(scheduleResolver, knownTypeContentResolver, contentResolver, channelResolver, publisher(), genreCreator); if (!uploadServices().isEmpty()) { createHealthProbes(uploadServices(), httpsUploadServices()); if (Boolean.parseBoolean(s3HttpsUpload) || Boolean.parseBoolean(httpsUpload)) { scheduler.schedule( new ScheduledPiUploadTask(uploadServices(), dayRangeGenerator, httpsUploadServices(), stateUpdater(), fileHistoryStore()).withName("Radioplayer HTTPS/S3 PI Full Upload"), UPLOAD_EVERY_TWO_HOURS); scheduler.schedule( new ScheduledPiUploadTask(uploadServices(), new DayRangeGenerator(), httpsUploadServices(), stateUpdater(), fileHistoryStore()).withName("Radioplayer HTTPS/S3 PI Today Upload"), UPLOAD_EVERY_THIRTY_MINUTES); scheduler.schedule( new ScheduledODUploadTask(uploadServices(), dayRangeGenerator, httpsUploadServices(), stateUpdater(), fileHistoryStore()).withName("Radioplayer HTTPS/S3 OD Full Upload"), NEVER); scheduler.schedule( new ScheduledODUploadTask(uploadServices(), new DayRangeGenerator(), httpsUploadServices(), stateUpdater(), fileHistoryStore()).withName("Radioplayer HTTPS/S3 OD Today Upload"), UPLOAD_EVERY_THIRTY_MINUTES); } for (QueueWorker<? extends QueueTask> worker : workers()) { workerExecutor.execute(worker); } } }