|
|
@ -225,18 +225,14 @@ func start_provider(__provider):
|
|
|
|
__provider.start_providing()
|
|
|
|
__provider.start_providing()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var known_participants := Dictionary() # id => Participant
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func get_or_create_participant(identifier:String) -> MajorityJudgmentParticipant:
|
|
|
|
func get_or_create_participant(identifier:String) -> MajorityJudgmentParticipant:
|
|
|
|
if not known_participants.has(identifier):
|
|
|
|
return get_poll().get_or_create_participant(identifier)
|
|
|
|
known_participants[identifier] = MajorityJudgmentParticipant.make(identifier)
|
|
|
|
|
|
|
|
return known_participants[identifier]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var __save_mutex := Mutex.new() # perhaps overzealous
|
|
|
|
var __save_mutex := Mutex.new() # perhaps overzealous
|
|
|
|
|
|
|
|
|
|
|
|
func __on_judgment_emitted(author_identifier, grade_index, candidate_index):
|
|
|
|
func __on_judgment_emitted(author_identifier, grade_index, candidate_index):
|
|
|
|
# Data comes from userland, best be careful here
|
|
|
|
# Data comes from userland, best be extra careful in here
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
grade_index < 0
|
|
|
|
grade_index < 0
|
|
|
|
or
|
|
|
|
or
|
|
|
|