MCPcopy
hub / github.com/Koed00/django-q / queue_size

Function queue_size

django_q/tasks.py:425–436  ·  view source on GitHub ↗

Returns the current queue size. Note that this doesn't count any tasks currently being processed by workers. :param broker: optional broker :return: current queue size :rtype: int

(broker=None)

Source from the content-addressed store, hash-verified

423
424
425def queue_size(broker=None):
426 """
427 Returns the current queue size.
428 Note that this doesn't count any tasks currently being processed by workers.
429
430 :param broker: optional broker
431 :return: current queue size
432 :rtype: int
433 """
434 if not broker:
435 broker = get_broker()
436 return broker.queue_size()
437
438
439def async_iter(func, args_iter, **kwargs):

Callers 1

test_clusterFunction · 0.90

Calls 2

get_brokerFunction · 0.90
queue_sizeMethod · 0.45

Tested by 1

test_clusterFunction · 0.72