Ejemplo n.º 1
0
    def process(self, event):

        if event.event_type == 'modified':
            cmd = 'FUPT'
        elif event.event_type == 'created':
            cmd = 'FADD'
        elif event.event_type == 'deleted':
            protocol.send_FDEL(event.src_path)
            return
        else:
            logger.error('unknown event happening {}'.format(event))
            return

        if event.is_directory:
            return

        if event.src_path == ignore_path:
            return

        concerned = tree.produce_tree(False, event.src_path)
        chunk.register_tree(concerned)
        protocol.send_FCMD(cmd, concerned)
Ejemplo n.º 2
0
def register_chunks_from_tree():
    # TODO: find a better hack
    if tree.usertree is None:
        tree.usertree = tree.produce_tree()

    register_tree(tree.usertree)
Ejemplo n.º 3
0
def register_chunks_from_tree():
    # TODO: find a better hack
    if tree.usertree is None:
        tree.usertree = tree.produce_tree()

    register_tree(tree.usertree)