def insert(self, subkey, value, add_timestamp=True, log_guid=None, log_index=None): FreezeDry.insert(self, subkey, value, add_timestamp) if type(subkey) is tuple or type(subkey) is list: # May or may not be necessary, depending on how scoping works with subkey subkey = FreezeDry.SEP_KEYPART.join(subkey) if not self.namespace.startswith('_log'): global logger logger.queue_log(self.namespace, self.key, subkey, value, log_guid, log_index)
def mark_as_changed(self): FreezeDry.mark_as_changed(self) if not self.awaiting_flush: global flusher flusher.enqueue(self) self.awaiting_flush = True
def flush(self): FreezeDry.flush(self) self.awaiting_flush = False
def __init__(self, _namespace, _key, parentpath): FreezeDry.__init__(self, _namespace, _key) self.awaiting_flush = False self.path = '%s%s.z' % (parentpath, _key) global packer packer.register(self)