MCPcopy
hub / github.com/celery/celery / format

Method format

celery/app/amqp.py:146–155  ·  view source on GitHub ↗

Format routing table into string for log dumps.

(self, indent=0, indent_first=True)

Source from the content-addressed store, hash-verified

144 return args.update({'x-max-priority': self.max_priority})
145
146 def format(self, indent=0, indent_first=True):
147 """Format routing table into string for log dumps."""
148 active = self.consume_from
149 if not active:
150 return ''
151 info = [QUEUE_FORMAT.strip().format(q)
152 for _, q in sorted(active.items())]
153 if indent_first:
154 return textindent('\n'.join(info), indent)
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.

Calls 2

itemsMethod · 0.45
joinMethod · 0.45