MCPcopy Create free account
hub / github.com/celery/celery / failing_cleanup

Method failing_cleanup

t/unit/backends/test_database.py:243–247  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

241 call_count = [0]
242
243 def failing_cleanup(*args, **kwargs):
244 call_count[0] += 1
245 if call_count[0] == 1:
246 raise DatabaseError("temporary failure", None, None)
247 return original_cleanup(*args, **kwargs)
248
249 tb._cleanup = failing_cleanup
250

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected