def close_review(user, repo, pull_request): try: log.info("Scheduling cleanup for %s/%s", user, repo) cleanup_pull_request.delay(user, repo, pull_request['number']) except: log.error('Could not publish job to celery. ' 'Make sure its running.') return Response(status=204)