Computer
: fallback on transport for get_minimum_job_poll_interval
default
#5457
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5455
The
get_minimum_job_poll_interval
returns a default when no value wasever explicitly defined for the
Computer
instance. This is currentlyprovided by the
PROPERTY_MINIMUM_SCHEDULER_POLL_INTERVAL__DEFAULT
attribute which is set to 10 seconds. This is a reasonable default for
most cases, but for the localhost it is probably excessive and can lead
to users waiting for a long time when running singular jobs on the
localhost.
The minimum job poll interval is not strictly a property of the
transport but in this case it is the transport that defines what happens
to be a sensible default. Therefore we still choose to add a new
attribute
DEFAULT_MINIMUM_JOB_POLL_INTERVAL
toTransport
which theComputer
can use as a default if none is specified on the instance.The
Transport
base class sets it to 10, which is backwards compatiblewith the current behavior, and the
LocalTransport
then overrides it to0.1
. We choose a small finite number such that the waiting time inmost cases should not really be noticeable without running the risk that
the CPUs will really spin like crazy for jobs that run slightly longer.