Esempio n. 1
0
	def sendFileTreePaths(self):
		logging.info('send message')
		rootPath = self.ibuffer
		message = protocol.SEND_SCORPION_PATHS+protocol.MESSAGE_TYPE_TERMINATOR
		message += protocol.getFileRootTree(rootPath)+protocol.MESSAGE_END_TERMINATOR
		producer = protocol.simple_producer(message)
		self.push_with_producer(producer)
Esempio n. 2
0
	def sendCurrentStateInfo(self):
		logging.info('send current work state')
		global doneTasks, runningTasks, enqueueTasks
		message = protocol.SEND_CURRENT_STATE_INFO+protocol.MESSAGE_TYPE_TERMINATOR
		message = protocol.wrapWorkStateInfo(done=doneTasks, running=runningTasks, enqueue=enqueueTasks)
		producer = protocol.simple_producer(message)
		self.push_with_producer(producer)