def main(): # Check if defaults have been installed # Keep this for now, will be removed shortly installed_defaults = memcache.get("installed_defaults") if installed_defaults is None: installed_defaults = Setting.all().filter("name = ", "installed_defaults").get() if installed_defaults is None: logging.info("Installing default statuses") Status.install_defaults() if not memcache.add("installed_defaults", True): logging.error("Memcache set failed.") wsgiref.handlers.CGIHandler().run(application())