diff --git a/server/fishtest/rundb.py b/server/fishtest/rundb.py index eb96db86d..732d5e8ef 100644 --- a/server/fishtest/rundb.py +++ b/server/fishtest/rundb.py @@ -1121,7 +1121,7 @@ def sync_request_task(self, worker_info): near_github_api_limit = worker_info["near_github_api_limit"] # Now we sort the list of unfinished runs according to priority. - last_run_id = self.worker_runs.get(unique_key, {}).get("last_run", None) + last_run_id = self.worker_runs.get(my_name, {}).get("last_run", None) def priority(run): # lower is better return ( @@ -1191,8 +1191,7 @@ def priority(run): # lower is better # GitHub API limit... if near_github_api_limit: have_binary = ( - unique_key in self.worker_runs - and run_id in self.worker_runs[unique_key] + my_name in self.worker_runs and run_id in self.worker_runs[my_name] ) if not have_binary: continue @@ -1286,10 +1285,10 @@ def priority(run): # lower is better # the worker has seen, as well as the last id that was seen. # Note that "worker_runs" is empty after a server restart. with self.worker_runs_lock: - if unique_key not in self.worker_runs: - self.worker_runs[unique_key] = {} - self.worker_runs[unique_key][run_id] = True - self.worker_runs[unique_key]["last_run"] = run_id + if my_name not in self.worker_runs: + self.worker_runs[my_name] = {} + self.worker_runs[my_name][run_id] = True + self.worker_runs[my_name]["last_run"] = run_id return {"run": run, "task_id": task_id} diff --git a/server/fishtest/schemas.py b/server/fishtest/schemas.py index ddc7b9dcc..9dbbb8cd4 100644 --- a/server/fishtest/schemas.py +++ b/server/fishtest/schemas.py @@ -849,7 +849,7 @@ def flags_must_match(run): } worker_runs_schema = { - uuid: { + short_worker_name: { run_id: True, "last_run": run_id, }