Example #1
0
	def upload(self, _):
		
		#swap with empty value, to assure newly added commands will not interfere with sending ones
		tmp = {}
		tmp, self.requeusts_queue = self.requeusts_queue, tmp
		for user_id, actions in tmp.items():
			log.debug('request to send actions from user %d'%(user_id,))
			asyncLoader = AsyncLoader(self, self.conf)
			req = request.RequestMaker()
			for unit_id, action_id in actions:
				log.debug('store action %d %d'%(unit_id,action_id))
				req.store_action( unit_id, action_id)
			
			uname = self.db.get_login(user_id)
			log.debug('send actions %s for user %s'%(req, uname))
			asyncLoader.recvActionsReply( (uname,self.conf.users[uname]), req, self.conf.pathOut)
			asyncLoader.start()
Example #2
0
	def sync(self, event):
		self.syncMenu.Enable(False)

		asyncLoader = AsyncLoader(self, self.conf)
			
		#req.store_action(16569557, 102)
		
		#req.createNewFleet( '822:978', 'client_generated_16429601')
		#reply <act id="ActionID" result="ok" return-id="fleet_id"/>
		
		for login in self.conf.users.items():
			asyncLoader.recvUserInfo(login, 'all', self.conf.pathArchive)
			asyncLoader.recvUserInfo(login, 'known_planets', self.conf.pathArchive)
		asyncLoader.start()