Exemplo n.º 1
0
Arquivo: scoutd.py Projeto: ywjt/Scout
	def _run(self):
		if not cacheserver_running_alive():
			Loger().ERROR('CacheServer not running... you must be start it first!')
			sys.exit(1)
		Loger().INFO('Scoutd %s ' % ScoutBase().avr['version'])
		Loger().INFO('Copyright (C) 2011-2019, YWJT.org.')
		Loger().INFO('Scoutd started with pid %d' % os.getpid())
		Loger().INFO('Scoutd started with %s' % datetime.datetime.now().strftime("%m/%d/%Y %H:%M"))
		Scout().run()
Exemplo n.º 2
0
def app_run():
    __HTTP_HOST = ScoutBase().avr['http_host']
    __HTTP_PORT = ScoutBase().avr['http_port']
    app.run(host=__HTTP_HOST, port=__HTTP_PORT, debug=False)
Exemplo n.º 3
0
Arquivo: scoutd.py Projeto: ywjt/Scout
    * If you set storage_type = 'Disk', the data records not be cleared.")
			if raw_input("Enter ('yes|y|Y'):") in ['yes', 'Y', 'y']:
				cached.restart()
				scoutd.restart()
		elif 'RESTART' == sys.argv[1].upper():
			scoutd.restart()
		elif 'RELOAD' == sys.argv[1].upper():
			scoutd.restart()
		elif 'STATUS' == (sys.argv[1]).upper():
			scoutd.status()
		elif 'HELP' == (sys.argv[1]).upper():
			help()
		elif 'WATCH' == (sys.argv[1]).upper():
			Scout().tailf()
		elif 'VERSION' == (sys.argv[1]).upper():
			print(ScoutBase().avr['version'])
		elif 'VIEW' == (sys.argv[1]).upper():
			Scout().view()
		elif 'INIT' == (sys.argv[1]).upper():
			print("Are you sure initialize Scoutd service?\n When the cache data will be cleared.")
			if raw_input("Enter ('yes|y|Y'):") in ['yes', 'Y', 'y']:
				cached.stop()
				initCache()
				cached.start()
		elif 'DSTAT' == (sys.argv[1]).upper():
			Scout().dstat()
		else:
			print "Unknow Command!"
			help()
			sys.exit(1)
	else: