42
37
class HashHandler(object):
48
42
def __init__(self, context=None, hash_id='1'):
50
44
self.session = db.get_session() if not context else context.session
54
47
def read_for_update(self):
58
48
# REVISIT(kevinbenton): locking here with the DB is prone to deadlocks
59
49
# in various multi-REST-call scenarios (router intfs, flips, etc).
60
50
# Since it doesn't work in Galera deployments anyway, another sync
61
51
# mechanism will have to be introduced to prevent inefficient double
62
52
# syncs in HA deployments.