-
Notifications
You must be signed in to change notification settings - Fork 33
Open
@erikwright
Description
By default no timeouts are set for the Redis client. It's poorly documented, but as far as I can tell, the Redis client will wait hang infinitely by default. This is not a sensible default for ci-queue clients, forcing every client to specify this value. socket_connect_timeout defaults to whatever is specified for socket_timeout, but since that is handled deep down in the Redis client and certainly not documented by ci-queue a responsible client might not rely on that.
I suggest explicitly setting sensible defaults for these two values to reduce the burden on clients.
ci-queue/python/ciqueue/_pytest/test_queue.py
Lines 59 to 81 in 3b7ac59
def build_queue(queue_url, tests_index=None):
spec = uritools.urisplit(queue_url)
if spec.scheme == 'list':
return ciqueue.Static(spec.path.split(':'))
elif spec.scheme == 'file':
return ciqueue.File(spec.path)
elif spec.scheme == 'redis':
redis_args = parse_redis_args(spec)
redis_client = redis.StrictRedis(**redis_args)
worker_args = parse_worker_args(spec.query, tests_index)
retry = bool(worker_args['retry'])
del worker_args['retry']
klass = ciqueue.distributed.Worker
if tests_index is None:
klass = ciqueue.distributed.Supervisor
queue = klass(tests=tests_index, redis=redis_client, **worker_args)
if retry and tests_index:
queue = queue.retry_queue()
return queue
else:
raise "Unknown queue scheme: " + repr(spec.scheme)
Metadata
Metadata
Assignees
Labels
No labels