From f21c26677b71e39ea363dc3f05045f602cfbd3d8 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 25 Oct 2012 16:04:12 -0400 Subject: [PATCH] added throttling --- python_apps/media-monitor2/media/monitor/organizer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/organizer.py b/python_apps/media-monitor2/media/monitor/organizer.py index 713bd2156..0532b79b0 100644 --- a/python_apps/media-monitor2/media/monitor/organizer.py +++ b/python_apps/media-monitor2/media/monitor/organizer.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +import time import media.monitor.pure as mmp import media.monitor.owners as owners from media.monitor.handler import ReportHandler @@ -72,6 +72,8 @@ class Organizer(ReportHandler,Loggable): directory=d) return cb + time.sleep(0.1) + mmp.magic_move(event.path, new_path, after_dir_make=new_dir_watch(dirname(new_path)))