diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-31 17:40:03 -0400 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-31 17:40:03 -0400 |
commit | d26dfc87e40dfb34481edbed75e0200931e9a815 (patch) | |
tree | 19b29fbc65be258452cf517c410baeaba98d7b68 /combox/silo.py | |
parent | c38b43cc643a734bec7fb5ac73e0dad58bd87529 (diff) |
ComboxSilo is now going to have dictionaries that track information about the shards.
modified: combox/events.py
modified: combox/silo.py
Diffstat (limited to 'combox/silo.py')
-rw-r--r-- | combox/silo.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/combox/silo.py b/combox/silo.py index a2a6b9b..4f5b746 100644 --- a/combox/silo.py +++ b/combox/silo.py @@ -39,6 +39,15 @@ class ComboxSilo(object): silo = path.join(config['silo_dir'], 'silo.db') self.db = pickledb.load(silo, True) + ## things we need for housekeep the node directory. + self.node_dicts = ['shard_created', 'shard_modified', 'shard_moved', + 'shard_deleted'] + + # created the dicts if not already created. + for ndict in self.node_dicts: + if not self.db.get(ndict): + self.db.dcreate(ndict) + self.lock = Lock() |