class CheckHandler(base.BaseHandler):
@base.authenticated
async def post(self, hostname):
- mirror = self.backend.mirrors.get_by_hostname(hostname)
+ mirror = await self.backend.mirrors.get_by_hostname(hostname)
if not mirror:
raise tornado.web.HTTPError(404, "Could not find mirror %s" % hostname)
raise tornado.web.HTTPError(403, "%s has no permission for %s" \
% (self.current_user, mirror))
- # check() creates its own transaction
+ # Run the check
await mirror.check(force=True)
# Redirect back to the mirror
- self.redirect("/mirrors/%s" % mirror.hostname)
+ await self.redirect("/mirrors/%s" % mirror.hostname)
class CreateHandler(base.BaseHandler):