]> git.parisson.com Git - tools.git/commitdiff
rm self.period, loop to 30s
authoryomguy <yomguy@457c0346-1240-4656-8a5a-9edca8063506>
Mon, 26 Jul 2010 15:28:32 +0000 (15:28 +0000)
committeryomguy <yomguy@457c0346-1240-4656-8a5a-9edca8063506>
Mon, 26 Jul 2010 15:28:32 +0000 (15:28 +0000)
git-svn-id: http://svn.parisson.org/svn/tools/trunk@113 457c0346-1240-4656-8a5a-9edca8063506

isp_tools/isp_trans.py

index b0930f5b6dc51a869d97aad13e50541de889796b..a101a48024ae2f8329c6cd8a2565a622a030abb6 100644 (file)
@@ -44,6 +44,7 @@ def get_pid(proc,uid):
             pids.append(pid)
     return pids
 
+
 class Logger:
 
     def __init__(self, file):
@@ -61,7 +62,6 @@ class Logger:
         self.logger.error(prefix + ' : ' + message.decode('utf8'))
 
 
-
 class ISPCollection:
 
     def __init__(self, dir):
@@ -140,8 +140,6 @@ class ISPTrans(object):
         self.xls_file = self.collection.xls_list()
         self.xls = ISPXLS(self.source_dir + os.sep + self.xls_file[0])
         self.trans_dict = self.xls.trans_dict()
-        # Time period for bi-threading in minutes
-        self.period = 1
 
         self.format = 'flv'
         self.size = '480x270'
@@ -211,7 +209,7 @@ class ISPTrans(object):
                     if not counter % 3:
                         while len(get_pid('ffmpeg', self.uid)) > 1:
                             # Only 2 threads for 2 cores and then sleeping
-                            time.sleep(self.period * 60)
+                            time.sleep(30)
                     os.system(command)