Made the transcoder run as a periodic task, with the interval defined in the config TOML file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2022-05-04 00:40:25 -04:00
parent 347211d566
commit 5bde5bfee0
4 changed files with 78 additions and 8 deletions

View File

@ -4,6 +4,8 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
import org.tomlj.Toml;
import org.tomlj.TomlParseResult;
import tech.bitgoblin.io.IOUtils;
@ -28,6 +30,10 @@ public class Config {
return this.result.getString(key);
}
public int getInt(String key) {
return Objects.requireNonNull(this.result.getDouble(key)).intValue();
}
public boolean contains(String key) {
return this.result.contains(key);
}