Author: dmeyer
Date: Wed Jan 10 11:34:47 2007
New Revision: 2373

Modified:
   trunk/beacon/src/server/thumbnailer.py

Log:
remove bursthandler here, we need it based on the inotify events

Modified: trunk/beacon/src/server/thumbnailer.py
==============================================================================
--- trunk/beacon/src/server/thumbnailer.py      (original)
+++ trunk/beacon/src/server/thumbnailer.py      Wed Jan 10 11:34:47 2007
@@ -46,7 +46,6 @@
 from kaa.beacon._libthumb import epeg, png, failed
 from videothumb import VideoThumb
 import cpuinfo
-import utils
 
 # get logging object
 log = logging.getLogger('beacon.thumbnail')
@@ -85,8 +84,6 @@
         self._ipc = kaa.rpc.Server(os.path.join(tmpdir, 'socket'))
         self._ipc.signals['client_connected'].connect(self.client_connect)
         self._ipc.connect(self)
-        # FIXME: hardcoded to making new thumbnails every 5 minutes
-        self._bursthandler = utils.BurstHandler(300, self.activate)
         # video module
         self.videothumb = VideoThumb(self)
 
@@ -246,21 +243,6 @@
         self._timer.start(delay)
 
 
-    def activate(self, name):
-        """
-        Activate thumbnail job with given image name.
-        """
-        if not name in self._delayed_jobs:
-            return
-        log.info('schedule delayed thumbnailing for %s', name)
-        for j in self._delayed_jobs.pop(name):
-            # FIXME: it makes no sense to schedule all here just
-            # to remove them on block later on notify_client
-            self.jobs.append(j)
-        # schedule thumbnailer
-        self.schedule_next()
-
-
     # -------------------------------------------------------------------------
     # External RPC API
     # -------------------------------------------------------------------------
@@ -269,12 +251,6 @@
     def schedule(self, id, filename, imagefile, size, priority):
         # FIXME: check if job is already scheduled!!!!
         job = Job(id, filename, imagefile, size, priority)
-        if self._bursthandler.active(imagefile):
-            # schedule called way to often
-            if not imagefile in self._delayed_jobs:
-                self._delayed_jobs[imagefile] = []
-            self._delayed_jobs[imagefile].append(job)
-            return
         self.jobs.append(job)
         self.schedule_next()
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to