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

Function persistent_failing_commit

t/integration/test_database_backend.py:76–78  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

74 call_count = [0]
75
76 def persistent_failing_commit(self, *args, **kwargs):
77 call_count[0] += 1
78 raise OperationalError("simulated persistent DB disconnect", params={}, orig=Exception())
79
80 with patch('sqlalchemy.orm.Session.commit', autospec=True, side_effect=persistent_failing_commit):
81 with pytest.raises(BackendStoreError):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected