示例#1
0
    watchdog = ConnectionWatchdog(globalData.serverComm,
                                  globalData.pingInterval,
                                  globalData.smtpAlert)
    # set thread to daemon
    # => threads terminates when main thread terminates
    watchdog.daemon = True
    watchdog.start()

    # start data collector thread
    dataCollector = LightningmapDataCollector(globalData.sensors)
    # set thread to daemon
    # => threads terminates when main thread terminates
    dataCollector.daemon = True
    dataCollector.start()

    # only start update checker if it is activated
    if updateActivated is True:
        updateChecker = UpdateChecker(updateServer, updatePort, updateLocation,
                                      updateCaFile, updateInterval,
                                      updateEmailNotification, globalData)
        # set thread to daemon
        # => threads terminates when main thread terminates
        updateChecker.daemon = True
        updateChecker.start()

    # set up sensor executer and execute it
    # (note: we will not return from the executer unless the client
    # is terminated)
    sensorExecuter = SensorExecuter(globalData.serverComm, globalData)
    sensorExecuter.execute()
示例#2
0
	# when connected => generate watchdog object to monitor the 
	# server connection
	watchdog = ConnectionWatchdog(globalData.serverComm,
		globalData.pingInterval, globalData.smtpAlert)
	# set thread to daemon
	# => threads terminates when main thread terminates	
	watchdog.daemon = True
	watchdog.start()

	# start data collector thread
	dataCollector = LightningmapDataCollector(globalData.sensors)
	# set thread to daemon
	# => threads terminates when main thread terminates
	dataCollector.daemon = True
	dataCollector.start()

	# only start update checker if it is activated
	if updateActivated is True:
		updateChecker = UpdateChecker(updateServer, updatePort, updateLocation,
			updateCaFile, updateInterval, updateEmailNotification, globalData)
		# set thread to daemon
		# => threads terminates when main thread terminates
		updateChecker.daemon = True
		updateChecker.start()

	# set up sensor executer and execute it
	# (note: we will not return from the executer unless the client
	# is terminated)
	sensorExecuter = SensorExecuter(globalData.serverComm, globalData)
	sensorExecuter.execute()