backend: add parameter to launch a number of generation workers
This commit is contained in:
parent
97a3aa713f
commit
c2c5cf4ce3
2 changed files with 8 additions and 1 deletions
|
@ -87,6 +87,7 @@ func main() {
|
|||
flag.StringVar(&fic.FilesDir, "files", "/files", "Request path prefix to reach files")
|
||||
var debugINotify = flag.Bool("debuginotify", false, "Show skipped inotofy events")
|
||||
flag.BoolVar(&skipInitialGeneration, "skipfullgeneration", skipInitialGeneration, "Skip the initial regeneration")
|
||||
flag.IntVar(¶llelJobs, "jobs", parallelJobs, "Number of generation workers")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[backend] ")
|
||||
|
@ -97,6 +98,8 @@ func main() {
|
|||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
launchWorkers()
|
||||
|
||||
log.Println("Creating submission directory...")
|
||||
if _, err := os.Stat(SubmissionDir); os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(SubmissionDir, 0777); err != nil {
|
||||
|
|
Reference in a new issue