mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-12 23:45:23 -05:00
Add _on_commit hook for tdb_cassandra.ThingBase.
This commit is contained in:
committed by
Neil Williams
parent
051ec10e25
commit
eab8a83da6
@@ -629,6 +629,8 @@ class ThingBase(object):
|
||||
|
||||
if not self._committed:
|
||||
self._on_create()
|
||||
else:
|
||||
self._on_commit()
|
||||
|
||||
self._committed = True
|
||||
|
||||
@@ -744,6 +746,10 @@ class ThingBase(object):
|
||||
well"""
|
||||
pass
|
||||
|
||||
def _on_commit(self):
|
||||
"""Executed on _commit other than creation."""
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def _all(cls):
|
||||
# returns a query object yielding every single item in a
|
||||
|
||||
Reference in New Issue
Block a user