Author: jerome
Date: 2009-07-03 13:04:22 +0200 (Fri, 03 Jul 2009)
New Revision: 5026

Modified:
   
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/executables/plugin-system.py
   
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/resources/plugin.xml
Log:
* Fixed a bug, tts messages was cut off.

Modified: 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/executables/plugin-system.py
===================================================================
--- 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/executables/plugin-system.py
    2009-07-03 10:42:05 UTC (rev 5025)
+++ 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/executables/plugin-system.py
    2009-07-03 11:04:22 UTC (rev 5026)
@@ -274,22 +274,25 @@
         Plugin entry point for the "run_daemon" command.
         """
         while self.__getDaemonRun():
+            result = []
             cpu, memory = self.run(True)
             if (int(cpu) > int(self.configuration().getCpuTresholdParam())):
-                self.throwNotification("start")
-                self.throwMessage("c p u meltdown")
-                self.throwNotification("stop")
+                result.append("c p u meltdown")
 
             if (int(memory) > int(self.configuration().getMemTresholdParam())):
-                self.throwNotification("start")
-                self.throwMessage("memory is up")
-                self.throwNotification("stop")
+                result.append("memory is up")
+            
+            if len(result) > 0:
+               self.throwNotification("start")
+               #then throw notifications.
+               for notification in result:
+                   self.throwMessage(notification)
+               self.throwNotification("stop")
 
             for i in range(40):
                 if not self.__getDaemonRun():
                     break
                 sleep(0.1)
-        sleep(3.0)
 
 
     def onPluginStop(self):

Modified: 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/resources/plugin.xml
===================================================================
--- 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/resources/plugin.xml
    2009-07-03 10:42:05 UTC (rev 5025)
+++ 
software_suite_v3/software/plugin/plugin-system/trunk/plugin-system/resources/plugin.xml
    2009-07-03 11:04:22 UTC (rev 5026)
@@ -53,7 +53,7 @@
                        description="Start system daemon"
             daemon="true"
             notifier="true"
-            expiration="1"/>
+            expiration="6"/>
        </commands>
     <tasks>
         <task


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to