MCPcopy
hub / github.com/celery/celery / select_add

Method select_add

celery/app/amqp.py:157–166  ·  view source on GitHub ↗

Add new task queue that'll be consumed from. The queue will be active even when a subset has been selected using the :option:`celery worker -Q` option.

(self, queue, **kwargs)

Source from the content-addressed store, hash-verified

155 return info[0] + '\n' + textindent('\n'.join(info[1:]), indent)
156
157 def select_add(self, queue, **kwargs):
158 """Add new task queue that'll be consumed from.
159
160 The queue will be active even when a subset has been selected
161 using the :option:`celery worker -Q` option.
162 """
163 q = self.add(queue, **kwargs)
164 if self._consume_from is not None:
165 self._consume_from[q.name] = q
166 return q
167
168 def select(self, include):
169 """Select a subset of currently defined queues to consume from.

Callers 3

test_select_addMethod · 0.95
setup_queuesMethod · 0.80
add_task_queueMethod · 0.80

Calls 1

addMethod · 0.95

Tested by 1

test_select_addMethod · 0.76