MCPcopy
hub / github.com/celery/celery / encode_result

Method encode_result

celery/backends/base.py:550–553  ·  view source on GitHub ↗
(self, result, state)

Source from the content-addressed store, hash-verified

548 return self.persistent if persistent is None else persistent
549
550 def encode_result(self, result, state):
551 if state in self.EXCEPTION_STATES and isinstance(result, Exception):
552 return self.prepare_exception(result)
553 return self.prepare_value(result)
554
555 def is_cached(self, task_id):
556 return task_id in self._cache

Callers 5

store_resultMethod · 0.95
_to_resultMethod · 0.80
on_chord_part_returnMethod · 0.80

Calls 2

prepare_exceptionMethod · 0.95
prepare_valueMethod · 0.95