diff --git a/server/fishtest/api.py b/server/fishtest/api.py index 49e8ec8f7..4c04d8907 100644 --- a/server/fishtest/api.py +++ b/server/fishtest/api.py @@ -24,10 +24,10 @@ ============== APIs hosted on the primary Fishtest instance have read and write access -to the `run_cache` via `rundb.get_run()` and `rundb.buffer()` +to the `run_cache` via `rundb.get_run()` and `rundb.buffer()` -APIs hosted on secondary instances have read access to the `run` -from the database via `rundb.get_run()`. However, they should not +APIs hosted on secondary instances have read access to the `run` +from the database via `rundb.get_run()`. However, they should not attempt to write to `run_cache` using `rundb.buffer()`. Proper configuration of `nginx` is crucial for this, and should be done diff --git a/server/fishtest/rundb.py b/server/fishtest/rundb.py index 5998c15a7..eb96db86d 100644 --- a/server/fishtest/rundb.py +++ b/server/fishtest/rundb.py @@ -40,7 +40,6 @@ Scheduler, crash_or_time, estimate_game_duration, - format_results, get_bad_workers, get_chi2, get_hash, @@ -935,7 +934,6 @@ def aggregate_unfinished_runs(self, username=None): if cores > 0: eta = remaining_hours(run) / cores pending_hours += eta - results = run["results"] return ( runs, pending_hours, @@ -1562,7 +1560,6 @@ def stop_run(self, run_id): run = self.get_run(run_id) self.set_inactive_run(run) - results = run["results"] try: validate(runs_schema, run, "run") except ValidationError as e: diff --git a/server/fishtest/views.py b/server/fishtest/views.py index 21f0c54dd..510329da1 100644 --- a/server/fishtest/views.py +++ b/server/fishtest/views.py @@ -1488,7 +1488,6 @@ def tests_view(request): if run is None: raise HTTPNotFound() follow = 1 if "follow" in request.params else 0 - results = run["results"] run_args = [("id", str(run["_id"]), "")] if run.get("rescheduled_from"): run_args.append(("rescheduled_from", run["rescheduled_from"], ""))