Refactored some code from the Transcoder class to a separate Repository class
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-05-06 02:47:56 -04:00
parent b049581632
commit a977ff8cfe
5 changed files with 100 additions and 58 deletions

View File

@ -14,13 +14,16 @@ public class App {
private static final String configFile = "~/.config/dragoon.toml";
private static final int msToMinutes = 60 * 1000;
public static void main(String[] args) {
// read our config file
Config c = new Config(configFile);
// create new Transcoder object and start the service
Transcoder t = new Transcoder(c);
Timer timer = new Timer();
timer.scheduleAtFixedRate(new RunTranscoderTask(t), 2500, 120 * 1000);
timer.scheduleAtFixedRate(new RunTranscoderTask(t), 2500, ((long) c.getInt("transcoder.interval") * msToMinutes));
System.out.printf("Starting transcoder, running in %d minute intervals.%n", c.getInt("transcoder.interval"));
}
}