Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
e85ea5c683
12 changed files with 58 additions and 44 deletions
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from kombu.messaging import Exchange, Queue, Consumer
|
||||
from kombu.connection import BrokerConnection
|
||||
from os.path import normpath
|
||||
|
||||
import json
|
||||
import os
|
||||
|
@ -133,7 +134,7 @@ class AirtimeMessageReceiver(Loggable):
|
|||
def remove_watch(self, msg):
|
||||
self.logger.info("Removing watch from directory: '%s'" %
|
||||
msg['directory'])
|
||||
self.manager.remove_watch_directory(msg['directory'])
|
||||
self.manager.remove_watch_directory(normpath(msg['directory']))
|
||||
|
||||
def rescan_watch(self, msg):
|
||||
self.logger.info("Trying to rescan watched directory: '%s'" %
|
||||
|
|
|
@ -28,8 +28,6 @@ class Manager(Loggable):
|
|||
include adding watched,store, organize directories, etc. Basically
|
||||
composes over WatchManager from pyinotify
|
||||
"""
|
||||
global_inst = None
|
||||
all_signals = set(['add_watch', 'remove_watch'])
|
||||
def __init__(self):
|
||||
self.wm = pyinotify.WatchManager()
|
||||
# These two instance variables are assumed to be constant
|
||||
|
@ -66,7 +64,6 @@ class Manager(Loggable):
|
|||
# The following set isn't really necessary anymore. Should be
|
||||
# removed...
|
||||
self.watched_directories = set([])
|
||||
Manager.global_inst = self
|
||||
|
||||
# This is the only event that we are unable to process "normally". I.e.
|
||||
# through dedicated handler objects. Because we must have access to a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue