backend: rely on configuration instead of started file to determine if the challenge is launched or not
This commit is contained in:
parent
af1cecd3ce
commit
75463dcebb
2 changed files with 3 additions and 9 deletions
|
@ -43,6 +43,7 @@ func watchsubdir(watcher *fsnotify.Watcher, pathname string) error {
|
|||
}
|
||||
}
|
||||
|
||||
var ChStarted = false
|
||||
var lastRegeneration time.Time
|
||||
var skipInitialGeneration = false
|
||||
|
||||
|
@ -50,6 +51,7 @@ func reloadSettings(config settings.FICSettings) {
|
|||
fic.HintCoefficient = config.HintCurCoefficient
|
||||
fic.WChoiceCoefficient = config.WChoiceCurCoefficient
|
||||
fic.ExerciceCurrentCoefficient = config.ExerciceCurCoefficient
|
||||
ChStarted = time.Since(config.Start) >= 0
|
||||
if lastRegeneration != config.Generation || fic.PartialValidation != config.PartialValidation || fic.FirstBlood != config.FirstBlood || fic.SubmissionCostBase != config.SubmissionCostBase || fic.SubmissionUniqueness != config.SubmissionUniqueness {
|
||||
fic.PartialValidation = config.PartialValidation
|
||||
if config.EnableExerciceDepend {
|
||||
|
|
Reference in a new issue