Beispiel #1
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()

    # generate receiver to handle incoming data (for example status updates)
    receiver = Receiver(globalData.serverComm)
    # set thread to daemon
    # => threads terminates when main thread terminates
    receiver.daemon = True
    receiver.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()

    # generate the console object and start it
    # (does not return unless it is exited)
    globalData.console = Console(globalData)
    globalData.console.startConsole()
Beispiel #2
0
				globalData.smtpAlert.sendCommunicationAlertClear()

			connectionRetries = 1
			break
		connectionRetries += 1

		logging.critical("[%s]: Connecting to server failed. " % fileName
			+ "Try again in 5 seconds.")
		print "Connecting to server failed. Try again in 5 seconds."
		time.sleep(5)

	# 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()

	# generate receiver to handle incoming data (for example status updates)
	receiver = Receiver(globalData.serverComm)
	# set thread to daemon
	# => threads terminates when main thread terminates	
	receiver.daemon = True
	receiver.start()

	# generate the console object and start it
	# (does not return unless it is exited)
	globalData.console = Console(globalData)
	globalData.console.startConsole()