MCPcopy
hub / github.com/celery/celery / dump_body

Function dump_body

celery/worker/consumer/consumer.py:131–136  ·  view source on GitHub ↗

Format message body for debugging purposes.

(m, body)

Source from the content-addressed store, hash-verified

129
130
131def dump_body(m, body):
132 """Format message body for debugging purposes."""
133 # v2 protocol does not deserialize body
134 body = m.body if body is None else body
135 return '{} ({}b)'.format(truncate(safe_repr(body), 1024),
136 len(m.body))
137
138
139class Consumer:

Callers 4

on_decode_errorMethod · 0.85
_message_reportMethod · 0.85
on_unknown_taskMethod · 0.85
on_invalid_taskMethod · 0.85

Calls 2

truncateFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected