def server_up(req):


    checkers = {
        "heartbeat": {
            "always_check": False,
            "message": "* celery heartbeat is down",
            "check_func": hb_check
        },
        "celery": {
            "always_check": True,
            "message": "* celery is down",
            "check_func": celery_check
        },
        "postgres": {
            "always_check": True,
            "message": "* postgres has issues",
            "check_func": pg_check
        },
        "couch": {
            "always_check": True,
            "message": "* couch has issues",
            "check_func": couch_check
        },
        "redis": {
            "always_check": True,
            "message": "* redis has issues",
            "check_func": redis_check
        },
    }

    failed = False
    message = ['Problems with HQ (%s):' % os.uname()[1]]
    for check, check_info in checkers.items():
        if check_info['always_check'] or req.GET.get(check, None) is not None:
            check_results, custom_msg = check_info['check_func']()
            if not check_results:
                failed = True
                if custom_msg:
                    message.append(custom_msg)
                else:
                    message.append(check_info['message'])
    if failed and not is_deploy_in_progress():
        create_datadog_event(
            'Serverup check failed', '\n'.join(message),
            alert_type='error', aggregation_key='serverup',
        )
        return HttpResponse('<br>'.join(message), status=500)
    else:
        return HttpResponse("success")
Guess column types based on a sample of data.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/views.py/server_up--crossover with--dataset/ETHPy150Open pandaproject/panda/panda/utils/xls.py/guess_column_types