diff --git a/cms/__init__.py b/cms/__init__.py index 8f17c113a9..1fd8ed062c 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -39,7 +39,7 @@ "Address", "ServiceCoord", "ConfigError", "async_config", "config", # util "mkdir", "rmtree", "utf8_decoder", "get_safe_shard", "get_service_address", - "get_service_shards", "contest_id_from_args", "default_argument_parser", + "random_service", "get_service_shards", "contest_id_from_args", "default_argument_parser", # plugin "plugin_list", ] @@ -60,6 +60,7 @@ # Acts as a "none of the above". TOKEN_MODE_MIXED = "mixed" + # Feedback level. # Full information (killing signals, time and memory, status for all @@ -73,5 +74,6 @@ from .conf import Address, ServiceCoord, ConfigError, async_config, config from .util import mkdir, rmtree, utf8_decoder, get_safe_shard, \ get_service_address, get_service_shards, contest_id_from_args, \ - default_argument_parser + random_service, default_argument_parser from .plugin import plugin_list + diff --git a/cms/server/admin/rpc_authorization.py b/cms/server/admin/rpc_authorization.py index 2f4287c6e8..739c22a0b7 100644 --- a/cms/server/admin/rpc_authorization.py +++ b/cms/server/admin/rpc_authorization.py @@ -27,8 +27,8 @@ RPCS_ALLOWED_FOR_AUTHENTICATED = [ ("AdminWebServer", "submissions_status"), ("ResourceService", "get_resources"), - ("EvaluationService", "workers_status"), - ("EvaluationService", "queue_status"), + ("QueueService", "workers_status"), + ("QueueService", "queue_status"), ("LogService", "last_messages"), ] @@ -39,9 +39,9 @@ RPCS_ALLOWED_FOR_ALL = RPCS_ALLOWED_FOR_MESSAGING + [ ("ResourceService", "kill_service"), ("ResourceService", "toggle_autorestart"), - ("EvaluationService", "enable_worker"), - ("EvaluationService", "disable_worker"), - ("EvaluationService", "invalidate_submission"), + ("QueueService", "enable_worker"), + ("QueueService", "disable_worker"), + ("QueueService", "invalidate_submission"), ("ScoringService", "invalidate_submission"), ] diff --git a/cms/server/admin/server.py b/cms/server/admin/server.py index 796ab84698..3c63338232 100644 --- a/cms/server/admin/server.py +++ b/cms/server/admin/server.py @@ -73,7 +73,10 @@ def __init__(self, shard): self.admin_web_server = self.connect_to( ServiceCoord("AdminWebServer", 0)) - self.evaluation_service = self.connect_to( + self.queue_service = self.connect_to( + ServiceCoord("QueueService", 0)) + # TODO: does it make sense to use a random one? + self.evaluation_services = self.connect_to( ServiceCoord("EvaluationService", 0)) self.scoring_service = self.connect_to( ServiceCoord("ScoringService", 0)) diff --git a/cms/server/admin/templates/macro/reevaluation_buttons.html b/cms/server/admin/templates/macro/reevaluation_buttons.html index 7e769d0cd9..d37cf49c74 100644 --- a/cms/server/admin/templates/macro/reevaluation_buttons.html +++ b/cms/server/admin/templates/macro/reevaluation_buttons.html @@ -36,7 +36,7 @@ {% set invalidate_arguments = {"contest_id": contest_id} %} {% endif %}