changed throttling
This commit is contained in:
parent
b89862f304
commit
5b051aae32
3 changed files with 7 additions and 5 deletions
|
@ -48,11 +48,13 @@ class BaseListener(object):
|
||||||
class OrganizeListener(BaseListener, pyinotify.ProcessEvent, Loggable):
|
class OrganizeListener(BaseListener, pyinotify.ProcessEvent, Loggable):
|
||||||
def process_IN_CLOSE_WRITE(self, event):
|
def process_IN_CLOSE_WRITE(self, event):
|
||||||
#self.logger.info("===> handling: '%s'" % str(event))
|
#self.logger.info("===> handling: '%s'" % str(event))
|
||||||
self.process_to_organize(event)
|
#self.process_to_organize(event)
|
||||||
|
pass
|
||||||
# got cookie
|
# got cookie
|
||||||
def process_IN_MOVED_TO(self, event):
|
def process_IN_MOVED_TO(self, event):
|
||||||
#self.logger.info("===> handling: '%s'" % str(event))
|
#self.logger.info("===> handling: '%s'" % str(event))
|
||||||
self.process_to_organize(event)
|
#self.process_to_organize(event)
|
||||||
|
pass
|
||||||
|
|
||||||
def process_default(self, event):
|
def process_default(self, event):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ManagerTimeout(threading.Thread,Loggable):
|
||||||
secnods. This used to be just a work around for cc-4235 but recently
|
secnods. This used to be just a work around for cc-4235 but recently
|
||||||
became a permanent solution because it's "cheap" and reliable
|
became a permanent solution because it's "cheap" and reliable
|
||||||
"""
|
"""
|
||||||
def __init__(self, manager, interval=3):
|
def __init__(self, manager, interval=1.5):
|
||||||
# TODO : interval should be read from config and passed here instead
|
# TODO : interval should be read from config and passed here instead
|
||||||
# of just using the hard coded value
|
# of just using the hard coded value
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
|
|
@ -72,12 +72,12 @@ class Organizer(ReportHandler,Loggable):
|
||||||
directory=d)
|
directory=d)
|
||||||
return cb
|
return cb
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(0.02)
|
||||||
|
|
||||||
mmp.magic_move(event.path, new_path,
|
mmp.magic_move(event.path, new_path,
|
||||||
after_dir_make=new_dir_watch(dirname(new_path)))
|
after_dir_make=new_dir_watch(dirname(new_path)))
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(0.02)
|
||||||
|
|
||||||
# The reason we need to go around saving the owner in this ass
|
# The reason we need to go around saving the owner in this ass
|
||||||
# backwards way is bewcause we are unable to encode the owner id
|
# backwards way is bewcause we are unable to encode the owner id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue