backend: don't regenerate files if config doesn't change
This commit is contained in:
parent
95f813447c
commit
9e5ab64589
@ -44,6 +44,7 @@ func watchsubdir(watcher *fsnotify.Watcher, pathname string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func reloadSettings(config settings.FICSettings) {
|
func reloadSettings(config settings.FICSettings) {
|
||||||
|
if fic.PartialValidation != config.PartialValidation || fic.UnlockedChallenges != !config.EnableExerciceDepend || fic.FirstBlood != config.FirstBlood || fic.SubmissionCostBase != config.SubmissionCostBase {
|
||||||
fic.PartialValidation = config.PartialValidation
|
fic.PartialValidation = config.PartialValidation
|
||||||
fic.UnlockedChallenges = !config.EnableExerciceDepend
|
fic.UnlockedChallenges = !config.EnableExerciceDepend
|
||||||
|
|
||||||
@ -55,6 +56,9 @@ func reloadSettings(config settings.FICSettings) {
|
|||||||
genAll()
|
genAll()
|
||||||
log.Println("Full generation done")
|
log.Println("Full generation done")
|
||||||
}()
|
}()
|
||||||
|
} else {
|
||||||
|
log.Println("No change found. Skipping regeneration.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user