diff options
Diffstat (limited to 'combox/events.py')
-rw-r--r-- | combox/events.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/combox/events.py b/combox/events.py index 4695c00..c0bc224 100644 --- a/combox/events.py +++ b/combox/events.py @@ -29,7 +29,7 @@ from combox.crypto import split_and_encrypt, decrypt_and_glue from combox.file import (mk_nodedir, rm_nodedir, rm_shards, relative_path, move_shards, move_nodedir, cb_path, node_path, hash_file, rm_path, - node_paths) + node_paths, no_of_shards) from combox.silo import ComboxSilo @@ -397,6 +397,13 @@ class NodeDirMonitor(LoggingEventHandler): file_cb_path = cb_path(event.src_path, self.config) + # get no. shards available + shards_there = no_of_shards(file_cb_path, self.config) + + if shards_there != self.num_nodes: + # got to wait for other shards to arrive! + return + if event.is_directory: # do nothing pass |