Esempio n. 1
0
	def get(self, uuid):
		try:
			uuid = str(uuid)
			employee_profile = utils.get_employee_profile(uuid)
			logging.debug(employee_profile)
			
			# Redirect the UI back to the Employee view
			self.redirect('/employees/'+uuid)
		except (Exception), e:
			logging.error('LinkedInGetSkillsController : get() : caught exception')
			logging.error(e)
			self.error(500)
Esempio n. 2
0
	def get(self):                                    
		try:
			if not self.request.headers.has_key('X-AppEngine-Cron'):
				logging.debug('UpdateLinkedInSkillsController : get() : Request Handler has been triggered manually. Returning.')
				return
            
			# Get all Employees from Memcache, as a db result list
			employees = appcache.get_all_employees()
			         
			for employee in employees:
				if employee.oauth_verifier != None and employee.oauth_verifier != '':
					uuid = employee.id
					response = utils.get_employee_profile(uuid)
					if response is True:
						logging.debug('Running CRON job to get latest LinkedIn Skills for Employee with UUID of '+uuid)
					else:
						logging.debug('NOT Running CRON job to get latest LinkedIn Skills for Employee with UUID of '+uuid)
			return
		except (Exception), e:
			logging.error(e)