示例#1
0
 def get(self):
     logging.debug("#######> DS: Maint: LoadProjects")
     ch = Change.all()
     
     seen = {}
     db.delete(Project.all())
     dev_p = CustomRomDevices().getDevices()['projects']
     self.response.headers['Content-Type'] = 'text/plain; charset=UTF-8'
     for c in ch:
         if c.project == 'KANG': continue
         if c.project in seen: continue
         
         p_type = project_type(c.project)
         self.response.out.write(c.project+"\n")
         seen[c.project] = 1
         project = Project(
                     branch=c.branch,
                     type=p_type,
                     project=c.project
                 )
         project.put()
     
     #memcache.flush_all()
     memcache_delete_multi(['filtered', 'merge-builds', 'device-projects'])
     return
示例#2
0
 def get(self):
     if allow_db_clear == False:
         self.response.headers['Content-Type'] = 'text/plain; charset=UTF-8'
         self.response.out.write("This feature is disabled...\n")
         self.response.set_status(401)
         return
     db.delete(Project.all())
     db.delete(Change.all())
     memcache.flush_all()
     self.response.headers['Content-Type'] = 'text/plain; charset=UTF-8'
     self.response.out.write("Database is empty...\n")