Decrease monitor sleep in tests

This commit is contained in:
mvdbeek
2022-05-26 12:48:43 +02:00
parent f4ff7b9d23
commit 33a3a203f4
6 changed files with 41 additions and 1 deletions
+15
View File
@@ -4175,6 +4175,21 @@
:Type: float
~~~~~~~~~~~~~~~~~~~~~~~~~~
``workflow_monitor_sleep``
~~~~~~~~~~~~~~~~~~~~~~~~~~
:Description:
Each Galaxy workflow handler process runs one thread responsible
for checking the state of active workflow invocations. This
thread operates in a loop and sleeps for the given number of
seconds at the end of each iteration. This can be decreased if
extremely high job throughput is necessary, but doing so can
increase CPU usage of handler processes. Float values are allowed.
:Default: ``1.0``
:Type: float
~~~~~~~~~~~~~~~~~~~~~
``metadata_strategy``
~~~~~~~~~~~~~~~~~~~~~
@@ -2066,6 +2066,14 @@ galaxy:
# allowed.
#job_runner_monitor_sleep: 1.0
# Each Galaxy workflow handler process runs one thread responsible for
# checking the state of active workflow invocations. This thread
# operates in a loop and sleeps for the given number of seconds at the
# end of each iteration. This can be decreased if extremely high job
# throughput is necessary, but doing so can increase CPU usage of
# handler processes. Float values are allowed.
#workflow_monitor_sleep: 1.0
# Determines how metadata will be set. Valid values are `directory`,
# `extended`, `directory_celery` and `extended_celery`. In extended
# mode jobs will decide if a tool run failed, the object stores
@@ -3053,6 +3053,17 @@ mapping:
decreased if extremely high job throughput is necessary, but doing so can increase CPU
usage of handler processes. Float values are allowed.
workflow_monitor_sleep:
type: float
default: 1.0
required: false
desc: |
Each Galaxy workflow handler process runs one thread responsible for
checking the state of active workflow invocations. This thread operates in a loop and
sleeps for the given number of seconds at the end of each iteration. This can be
decreased if extremely high job throughput is necessary, but doing so can increase CPU
usage of handler processes. Float values are allowed.
metadata_strategy:
type: str
required: false
+1 -1
View File
@@ -314,7 +314,7 @@ class WorkflowRequestMonitor(Monitors):
log.trace(monitor_step_timer.to_str())
except Exception:
log.exception("An exception occured scheduling while scheduling workflows")
self._monitor_sleep(1)
self._monitor_sleep(self.app.config.workflow_monitor_sleep)
def __schedule(self, workflow_scheduler_id, workflow_scheduler):
invocation_ids = self.__active_invocation_ids(workflow_scheduler_id)
+3
View File
@@ -255,6 +255,9 @@ def setup_galaxy_config(
monitor_thread_join_timeout=5,
object_store_store_by="uuid",
fetch_url_allowlist="127.0.0.1",
job_handler_monitor_sleep=0.2,
job_runner_monitor_sleep=0.2,
workflow_monitor_sleep=0.2,
)
if default_shed_tool_data_table_config:
config["shed_tool_data_table_config"] = default_shed_tool_data_table_config
+3
View File
@@ -188,7 +188,9 @@ DO_NOT_TEST = [
"id_secret", # broken: default overridden
"job_config", # no obvious testable defaults
"job_config_file", # broken: remove 'config/' prefix from schema
"job_handler_monitor_sleep", # configured in driver_util
"job_metrics_config_file",
"job_runner_monitor_sleep", # configured in driver_util
"job_working_directory", # broken; may or may not be able to test
"library_import_dir", # broken: default overridden
"logging", # mapping loaded in config/
@@ -218,6 +220,7 @@ DO_NOT_TEST = [
"user_tool_label_filters", # broken: default overridden
"user_tool_section_filters", # broken: default overridden
"webhooks_dir", # broken; also remove 'config/' prefix from schema
"workflow_monitor_sleep", # configured in driver_util
"workflow_resource_params_mapper", # broken: remove 'config/' prefix from schema
]