add config tempdir and default values
This commit is contained in:
parent
69b2d96c92
commit
da66c2fdf9
2 changed files with 9 additions and 0 deletions
|
@ -13,6 +13,7 @@ type Server struct {
|
|||
|
||||
type Worker struct {
|
||||
ID string
|
||||
TempDir string
|
||||
Address string
|
||||
Name string
|
||||
FFmpegPath string
|
||||
|
|
8
main.go
8
main.go
|
@ -40,6 +40,14 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
if conf.Worker.FFmpegPath == "" {
|
||||
conf.Worker.FFmpegPath = "ffmpeg"
|
||||
}
|
||||
|
||||
if conf.Worker.TempDir == "" {
|
||||
conf.Worker.TempDir = "/tmp"
|
||||
}
|
||||
|
||||
if *isserver {
|
||||
slog.Info("Starting Server...")
|
||||
server.Start(conf, templates, static, migrations)
|
||||
|
|
Loading…
Add table
Reference in a new issue