コード例 #1
0
	def aero(self, aero):
		"""Retrieve all the issues in a project."""
		#data = memcache.get("issues_all")
		
		query = gdata.projecthosting.client.Query(label=aero)
		feed = self.client.get_issues(conf.GOOGLE_PROJECT, query=query)
		#print feed
		data = []
		for issue in feed.entry:
			dic = self.process_entry(issue)
			data.append(dic)
		return data
コード例 #2
0
	def all(self, status):
		"""Retrieve all the issues in a project."""
		if 1 == 0:
			data = memcache.get("issues_all")
			if data is not None:
				return data, True

		query = gdata.projecthosting.client.Query(max_results=200,status=status)
		feed = self.client.get_issues(conf.GOOGLE_PROJECT, query=query)
		data = []
		for issue in feed.entry:
			dic = self.process_entry(issue)
			data.append(dic)
			
		if not memcache.set("issues_all", data, 10):
			print "error"
		return data, False
コード例 #3
0
	def all(self):
		"""Retrieve all the issues in a project."""
		#data = memcache.get("issues_all")
		#if data is not None:
		#	return data, True
		client = gdata.projecthosting.client.ProjectHostingClient()
		client.client_login(
					conf.USER_NAME,
					conf.USER_PASS,
					source='flightgear-bot',
					service='code')
		feed = client.get_issues(conf.GOOGLE_PROJECT)
		data = []
		print sfeed
		for issue in feed.entry:
			dic = process_entry(issue)
			data.append(dic)
		if not memcache.set("issues_all", data, 60):
			print "error"
		return data