def stop(self): # Removing all User Events weioParser.removeUserEvents() print "STOPPING USER PROCESSES" print "=======<> self.launcherProcess ", self.launcherProcess if self.launcherProcess != None: self.launcherProcess.terminate() self.launcherProcess.join(0.5) try: # If job is not properly done than kill it with bazooka os.kill(self.launcherProcess.pid, 9) # very violent except: pass self.launcherProcess = None # Reset user attached elements weioUserApi.attach.procs = {} weioUserApi.attach.events = {} weioUserApi.attach.ints = {} # Clear all conncetions weioRunnerGlobals.weioConnections.clear()
def stop(self): # Removing all User Events weioParser.removeUserEvents() print "STOPPING USER PROCESSES" #print ">>> userProcessList = ", self.userProcessList for p in self.userProcessList: #print "KILLING PROCESS PID", p.pid p.terminate() p.join(0.5) try: # If job is not properly done than kill it with bazooka os.kill(p.pid, 9) # very violent except: pass self.userProcessList.remove(p) #print "OK" #print "### userProcessList = ", self.userProcessList if (weioIO.gpio != None): if (weioRunnerGlobals.WEIO_SERIAL_LINKED == True): weioIO.gpio.stopReader() weioIO.gpio.reset() # Reset user attached elements weioUserApi.attach.procs = {} weioUserApi.attach.events = {} weioUserApi.attach.ins = {}
def stop(self): # Removing all User Events weioParser.removeUserEvents() print "STOPPING USER PROCESSES" print "=======<> self.launcherProcess ", self.launcherProcess if (self.launcherProcess != None): self.launcherProcess.terminate() self.launcherProcess.join(0.5) try: # If job is not properly done than kill it with bazooka os.kill(self.launcherProcess.pid, 9) # very violent except: pass self.launcherProcess = None # Reset user attached elements weioUserApi.attach.procs = {} weioUserApi.attach.events = {} weioUserApi.attach.ints = {} # Clear all conncetions weioRunnerGlobals.weioConnections.clear()
def stop(self): if (httpServer is not None): httpServer.stop() weioRunnerGlobals.running.value = False # Removing all User Events weioParser.removeUserEvents() #print "STOPPING USER PROCESSES" #print "=======<> self.launcherProcess ", self.launcherProcess if (self.launcherProcess != None): self.launcherProcess.terminate() self.launcherProcess.join(0.5) try: # If job is not properly done than kill it with bazooka os.kill(self.launcherProcess.pid, 9) # very violent except: pass self.launcherProcess = None # Reset user attached elements weioUserApi.attach.procs = {} weioUserApi.attach.events = {} weioUserApi.attach.ints = {} # Clear all connetions weioRunnerGlobals.weioConnections.clear() # Empty the Queue of all messages while self.qIn.empty() == False: self.qIn.get() while self.qOut.empty() == False: self.qOut.get()