Refactored some code from the Transcoder class to a separate Repository class
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user