Changeset 5533


Ignore:
Timestamp:
Jul 14, 2017, 3:01:06 PM (23 months ago)
Author:
hectorgh
Message:

moving startup to a thread

Location:
n4d-shutdowner-client/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • n4d-shutdowner-client/trunk/fuentes/debian/changelog

    r5480 r5533  
     1n4d-shutdowner-client (0.3.1) xenial; urgency=high
     2
     3  * Moving startup to a thread
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Fri, 14 Jul 2017 15:00:30 +0200
     6
    17n4d-shutdowner-client (0.3) xenial; urgency=high
    28
  • n4d-shutdowner-client/trunk/fuentes/install-files/usr/share/n4d/python-plugins/ShutdownerClient.py

    r5479 r5533  
    11import os
     2import threading
    23
    34
     
    1213        def startup(self,options):
    1314               
     15                t=threading.Thread(target=self._startup)
     16                t.daemon=True
     17                t.start()
     18               
     19        #def startup
     20       
     21        def _startup(self):
     22               
     23                # Somehow, until I understand why, remote variables are only readable via threads
     24               
    1425                self.shutdowner_var=objects["VariablesManager"].get_variable("SHUTDOWNER")
    1526                self.shutdowner_trigger(self.shutdowner_var)
    16                
    1727                objects["VariablesManager"].register_trigger("SHUTDOWNER","ShutdownerClient",self.shutdowner_trigger)
    1828               
Note: See TracChangeset for help on using the changeset viewer.