Merge remote-tracking branch 'origin/master' into touchdown

Conflicts:
	test/data/test.db
This commit is contained in:
Jake Moshenko 2014-05-21 14:43:57 -04:00
commit 8c3448080c
62 changed files with 581 additions and 339 deletions

View file

@ -2,13 +2,13 @@ import logging
import os
from flask import (abort, redirect, request, url_for, make_response, Response,
Blueprint, send_from_directory)
Blueprint, send_from_directory, jsonify)
from flask.ext.login import current_user
from urlparse import urlparse
from data import model
from data.model.oauth import DatabaseAuthorizationProvider
from app import app, billing as stripe
from app import app, billing as stripe, build_logs
from auth.auth import require_session_login
from auth.permissions import AdministerOrganizationPermission
from util.invoice import renderInvoiceToPdf
@ -146,7 +146,16 @@ def v1():
@web.route('/status', methods=['GET'])
@no_cache
def status():
return make_response('Healthy')
db_healthy = model.check_health()
buildlogs_healthy = build_logs.check_health()
response = jsonify({
'db_healthy': db_healthy,
'buildlogs_healthy': buildlogs_healthy,
})
response.status_code = 200 if db_healthy and buildlogs_healthy else 503
return response
@web.route('/tos', methods=['GET'])