Exemplo n.º 1
0
def main():
    with alfred.create_logger(LOGGER_DIR, alfred.logger.ALL, alfred.logger.APPEND) as logger:
        try:
            context = zmq.Context()
            logger.info("Creating load balancer")
            load_balancer = LoadBalancer(logger, context)
            load_balancer.run()
        except:
            logger.fatal("Unhandled exception, traceback below\n%s" % traceback.format_exc())
Exemplo n.º 2
0
def main():
	with alfred.create_logger(LOGGER_DIR, alfred.logger.ALL, alfred.logger.APPEND) as logger:
		try:
			context = zmq.Context()
			logger.info('Creating result sink')
			result_sink = ResultSink(logger, context)
			result_sink.run()
		except:
			logger.fatal('Unhandled exception, traceback below\n%s' % traceback.format_exc())
Exemplo n.º 3
0
def main(argv):
	if len(argv) > 1:
		work_url = 'tcp://%s:%d' % (argv[1], alfred.LOADBALANCER_BACKEND_PORT)
	else:
		work_url = 'tcp://localhost:%d' % alfred.LOADBALANCER_BACKEND_PORT

	with alfred.create_logger(LOGGER_DIR, alfred.logger.ALL, alfred.logger.APPEND) as logger:
		try:
			context = zmq.Context()
			logger.info('Creating super server')
			super_server = SuperServer(logger, context, work_url)
			super_server.run()
		except:
			logger.fatal('Unhandled exception, traceback below\n%s' % traceback.format_exc())
Exemplo n.º 4
0
def main(argv):
	if len(argv) > 2:
		backend_url = 'tcp://%s:%d' % (argv[1], alfred.LOADBALANCER_FRONTEND_PORT)
		result_pull_url = 'tcp://%s:%d' % (argv[2], alfred.RESULTSINK_PUSH_PORT)
	else:
		backend_url = 'tcp://localhost:%d' % alfred.LOADBALANCER_FRONTEND_PORT
		result_pull_url = 'tcp://localhost:%d' % alfred.RESULTSINK_PUSH_PORT

	with alfred.create_logger(LOGGER_DIR, alfred.logger.ALL, alfred.logger.APPEND) as logger:
		try:
			context = zmq.Context()
			logger.info('Creating matchmaker')
			matchmaker = Matchmaker(logger, context, backend_url, result_pull_url, os.path.join('..', 'alfred.conf'))
			matchmaker.run()
		except:
			logger.fatal('Unhandled exception, traceback below\n%s' % traceback.format_exc())