aboutsummaryrefslogtreecommitdiff
path: root/cmd/server
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/server')
-rw-r--r--cmd/server/main.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 0abdc09..8b1cc00 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -28,10 +28,11 @@ import (
func main() {
var (
- key = flag.String("aes-key", "", "AES key, either 16, 24, or 32 bytes string to select AES-128, AES-192, or AES-256")
- dbType = flag.String("db-type", "sqlite", "Database to be used. Choose either mysql, psql or sqlite")
- dbCon = flag.String("db-con", "main.db", "Database string connection for given database type. Ref: https://gorm.io/docs/connecting_to_the_database.html")
- logLevel = flag.String("log-level", "error", "Log level: Choose either trace, debug, info, warning, error, fatal or panic")
+ key = flag.String("aes-key", "", "AES key, either 16, 24, or 32 bytes string to select AES-128, AES-192, or AES-256")
+ dbType = flag.String("db-type", "sqlite", "Database to be used. Choose either mysql, psql or sqlite")
+ dbCon = flag.String("db-con", "main.db", "Database string connection for given database type. Ref: https://gorm.io/docs/connecting_to_the_database.html")
+ logLevel = flag.String("log-level", "error", "Log level: Choose either trace, debug, info, warning, error, fatal or panic")
+ schedulerCount = flag.Uint("scheduler-count", 10, "How many workers are created to process media files")
// TODO: this will later be replaced by user specific root folder
root = flag.String("root", "", "root folder for the whole application. All the workers will use it as working directory")
@@ -79,7 +80,7 @@ func main() {
extRouter.AddMiddleware(authMiddleware.LoggedIn)
extRouter.AddMiddleware(ext.HTML)
- scheduler := worker.NewScheduler(10)
+ scheduler := worker.NewScheduler(*schedulerCount)
// repository
var (