mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
remove statsd
This commit is contained in:
@@ -22,9 +22,7 @@ from django.db import connection
|
||||
# AWX
|
||||
from awx.main.models import * # noqa
|
||||
from awx.main.socket import Socket
|
||||
from awx.lib.metrics import BaseTimer
|
||||
|
||||
fn_timer = BaseTimer(__name__)
|
||||
logger = logging.getLogger('awx.main.commands.run_callback_receiver')
|
||||
|
||||
WORKERS = 4
|
||||
@@ -100,7 +98,6 @@ class CallbackReceiver(object):
|
||||
break
|
||||
time.sleep(0.1)
|
||||
|
||||
@fn_timer
|
||||
def write_queue_worker(self, preferred_queue, worker_queues, message):
|
||||
queue_order = sorted(range(WORKERS), cmp=lambda x, y: -1 if x==preferred_queue else 0)
|
||||
for queue_actual in queue_order:
|
||||
@@ -164,7 +161,6 @@ class CallbackReceiver(object):
|
||||
sys.exit(1)
|
||||
last_parent_events[message['job_id']] = job_parent_events
|
||||
|
||||
@fn_timer
|
||||
@transaction.atomic
|
||||
def process_job_event(self, data):
|
||||
# Sanity check: Do we need to do anything at all?
|
||||
@@ -227,7 +223,6 @@ class CallbackReceiver(object):
|
||||
logger.error('Database error saving job event: %s', e)
|
||||
return None
|
||||
|
||||
@fn_timer
|
||||
@transaction.atomic
|
||||
def process_ad_hoc_event(self, data):
|
||||
# Sanity check: Do we need to do anything at all?
|
||||
|
||||
@@ -43,7 +43,6 @@ from django.core.mail import send_mail
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# AWX
|
||||
from awx.lib.metrics import task_timer
|
||||
from awx.main.constants import CLOUD_PROVIDERS
|
||||
from awx.main.models import * # noqa
|
||||
from awx.main.models.label import Label
|
||||
@@ -301,7 +300,6 @@ class BaseTask(Task):
|
||||
model = None
|
||||
abstract = True
|
||||
|
||||
@task_timer
|
||||
def update_model(self, pk, _attempt=0, **updates):
|
||||
"""Reload the model instance from the database and update the
|
||||
given fields.
|
||||
@@ -371,7 +369,6 @@ class BaseTask(Task):
|
||||
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
return path
|
||||
|
||||
@task_timer
|
||||
def build_private_data_files(self, instance, **kwargs):
|
||||
'''
|
||||
Create a temporary files containing the private data.
|
||||
@@ -426,7 +423,6 @@ class BaseTask(Task):
|
||||
'': '',
|
||||
}
|
||||
|
||||
@task_timer
|
||||
def build_env(self, instance, **kwargs):
|
||||
'''
|
||||
Build environment dictionary for ansible-playbook.
|
||||
@@ -450,7 +446,6 @@ class BaseTask(Task):
|
||||
env['PROOT_TMP_DIR'] = tower_settings.AWX_PROOT_BASE_PATH
|
||||
return env
|
||||
|
||||
@task_timer
|
||||
def build_safe_env(self, instance, **kwargs):
|
||||
'''
|
||||
Build environment dictionary, hiding potentially sensitive information
|
||||
@@ -519,7 +514,6 @@ class BaseTask(Task):
|
||||
'''
|
||||
return OrderedDict()
|
||||
|
||||
@task_timer
|
||||
def run_pexpect(self, instance, args, cwd, env, passwords, stdout_handle,
|
||||
output_replacements=None):
|
||||
'''
|
||||
@@ -603,7 +597,6 @@ class BaseTask(Task):
|
||||
Hook for any steps to run after job/task is complete.
|
||||
'''
|
||||
|
||||
@task_timer
|
||||
def run(self, pk, **kwargs):
|
||||
'''
|
||||
Run the job/task and capture its output.
|
||||
@@ -699,7 +692,6 @@ class RunJob(BaseTask):
|
||||
name = 'awx.main.tasks.run_job'
|
||||
model = Job
|
||||
|
||||
@task_timer
|
||||
def build_private_data(self, job, **kwargs):
|
||||
'''
|
||||
Returns a dict of the form
|
||||
@@ -1005,7 +997,6 @@ class RunProjectUpdate(BaseTask):
|
||||
name = 'awx.main.tasks.run_project_update'
|
||||
model = ProjectUpdate
|
||||
|
||||
@task_timer
|
||||
def build_private_data(self, project_update, **kwargs):
|
||||
'''
|
||||
Return SSH private key data needed for this project update.
|
||||
@@ -1173,7 +1164,6 @@ class RunInventoryUpdate(BaseTask):
|
||||
name = 'awx.main.tasks.run_inventory_update'
|
||||
model = InventoryUpdate
|
||||
|
||||
@task_timer
|
||||
def build_private_data(self, inventory_update, **kwargs):
|
||||
"""Return private data needed for inventory update.
|
||||
If no private data is needed, return None.
|
||||
@@ -1505,7 +1495,6 @@ class RunAdHocCommand(BaseTask):
|
||||
name = 'awx.main.tasks.run_ad_hoc_command'
|
||||
model = AdHocCommand
|
||||
|
||||
@task_timer
|
||||
def build_private_data(self, ad_hoc_command, **kwargs):
|
||||
'''
|
||||
Return SSH private key data needed for this ad hoc command (only if
|
||||
|
||||
Reference in New Issue
Block a user