Backend: start by generating files for all teams
This commit is contained in:
parent
1c62f61bf0
commit
1d8f9b0785
|
@ -45,6 +45,7 @@ func main() {
|
|||
var dsn = flag.String("dsn", "fic:fic@/fic", "DSN to connect to the MySQL server")
|
||||
flag.StringVar(&SubmissionDir, "submission", "./submissions", "Base directory where save submissions")
|
||||
flag.StringVar(&TeamsDir, "teams", "../TEAMS", "Base directory where save teams JSON files")
|
||||
var skipFullGeneration = flag.Bool("skipFullGeneration", false, "Skip initial full generation (safe to skip after start)")
|
||||
flag.Parse()
|
||||
|
||||
SubmissionDir = path.Clean(SubmissionDir)
|
||||
|
@ -76,6 +77,11 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if !*skipFullGeneration {
|
||||
log.Println("Generating files...")
|
||||
go genAll()
|
||||
}
|
||||
|
||||
for {
|
||||
select {
|
||||
case ev := <-watcher.Event:
|
||||
|
|
Loading…
Reference in New Issue
Block a user