Changed the default config location to /etc/dragoon/config.toml; added a CLI option (-c) to specify a different config file.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
2022-07-17 14:04:48 -04:00
parent dad3e6c1cf
commit 2e55876076
4 changed files with 60 additions and 4 deletions

View File

@ -1,5 +1,7 @@
package tech.bitgoblin;
import org.apache.commons.cli.ParseException;
import tech.bitgoblin.config.Cmd;
import tech.bitgoblin.config.Config;
import tech.bitgoblin.transcoder.RunTranscoderTask;
import tech.bitgoblin.transcoder.Transcoder;
@ -12,13 +14,15 @@ import java.util.Timer;
*/
public class App {
private static final String configFile = "~/.config/dragoon.toml";
private static final int msToMinutes = 60 * 1000;
public static void main(String[] args) {
public static void main(String[] args) throws ParseException {
// parse command-line options
Cmd cmd = new Cmd(args);
// read our config file
Config c = new Config(configFile);
Config c = new Config(cmd.getConfigPath());
// create new Transcoder object and start the service
Transcoder t = new Transcoder(c);
Timer timer = new Timer();