Exemplo n.º 1
0
	def index(self):
		ids = queues.keys()
		listenerCount = 0
		venterCount = 0
		for id in ids:
			try:
				queue = queues[id]
				if queue[0][1].started:
					listenerCount += 1
				if queue[1][1].started:
					venterCount += 1
			except:
				pass
		return render('Index.mako', dict(listenerCount=listenerCount, venterCount=venterCount, userCount=(listenerCount + venterCount)))
Exemplo n.º 2
0
	def chat(self):
		type = request.params.get('type', None)
		if type not in (u'listener', u'venter'):
			return 'Invalid type.'
		return render('Chat.mako', dict(type=type))