Exemple #1
0
def record(request):
    flag = waffle.models.Flag.objects.get(name='collect-timings')
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn this off here.
    if flag.everyone:
        return django_statsd_record(request)
    return http.HttpResponseForbidden()
Exemple #2
0
def record(request):
    flag = waffle.models.Flag.objects.get(name='collect-timings')
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn this off here.
    if flag.everyone:
        return django_statsd_record(request)
    return http.HttpResponseForbidden()
Exemple #3
0
def record(request):
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn the percentage down to zero.
    if get_collect_timings():
        return django_statsd_record(request)
    return HttpResponseForbidden()
Exemple #4
0
def record(request):
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn the percentage down to zero.
    if get_collect_timings():
        return django_statsd_record(request)
    raise PermissionDenied
Exemple #5
0
def record(request):
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn the percentage down to zero.
    if get_collect_timings():
        return django_statsd_record(request)
    raise PermissionDenied
Exemple #6
0
def record(request):
    # The rate limiting is done up on the client, but if things go wrong
    # we can just turn the percentage down to zero.
    if get_collect_timings():
        return django_statsd_record(request)
    return HttpResponseForbidden()