Changeset bcdc845341716e64935c3f5371b74473b68d61d8

Show
Ignore:
Timestamp:
04/08/08 22:11:31 (9 months ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1207710691 -0500
git-parent:

[9567aeae71db6082ee952d3bf002c3897db5363d]

git-author:
Jason Michalski <armooo@armooo.net> 1207544840 -0500
Message:

Check for new downloads every 15mins

If we don't the tivo will say we have not been connecting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/webvideo/webvideo.py

    r098d6b5 rbcdc845  
    1010import shutil 
    1111import os.path 
     12import time 
    1213import os 
    1314import urlparse 
     
    3233 
    3334        self.startXMPP() 
    34         self.xmpp_cdsupdate() 
    3535        self.startWorkerThreads() 
    3636 
     
    6464    def startWorkerThreads(self): 
    6565        for i in range(self.download_thread_num): 
    66             t = threading.Thread(target=self.processDlRequest
     66            t = threading.Thread(target=self.processDlRequest, name='webvideo downloader'
    6767            t.setDaemon(True) 
    6868            t.start() 
     69 
     70        t = threading.Thread(target=self.watchQueue, name='webvideo queue watcher') 
     71        t.setDaemon(True) 
     72        t.start() 
    6973 
    7074    def processXMPP(self, client): 
     
    8286        method = getattr(self, method_name) 
    8387        method(xmpp_action) 
     88 
     89    def watchQueue(self): 
     90        while True: 
     91            self.xmpp_cdsupdate() 
     92            time.sleep(60*15) 
    8493 
    8594    def xmpp_cdsupdate(self, xml=None):