Remove dogstatsd-python in favor of dogapi

Also added datadog application to commom django apps and set it to use
a local statsd server by default.
This commit is contained in:
Carlos Andrés Rocha
2013-09-09 16:15:24 -04:00
parent 0734d835a1
commit ee0004e2f8
15 changed files with 97 additions and 64 deletions

View File

@@ -4,7 +4,7 @@ from codejail.safe_exec import safe_exec as codejail_safe_exec
from codejail.safe_exec import not_safe_exec as codejail_not_safe_exec
from codejail.safe_exec import json_safe, SafeExecException
from . import lazymod
from statsd import statsd
from dogapi import dog_stats_api
import hashlib
@@ -70,7 +70,7 @@ def update_hash(hasher, obj):
hasher.update(repr(obj))
@statsd.timed('capa.safe_exec.time')
@dog_stats_api.timed('capa.safe_exec.time')
def safe_exec(code, globals_dict, random_seed=None, python_path=None, cache=None, slug=None, unsafely=False):
"""
Execute python code safely.