mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
remove statsd
This commit is contained in:
parent
5fd8ac7773
commit
ae73be12f1
@ -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
|
||||
|
||||
@ -1002,5 +1002,3 @@ LOGGING = {
|
||||
}
|
||||
}
|
||||
|
||||
STATSD_CLIENT = 'django_statsd.clients.null'
|
||||
STATSD_HOST = 'localhost'
|
||||
|
||||
@ -65,15 +65,6 @@ PASSWORD_HASHERS = (
|
||||
# Configure a default UUID for development only.
|
||||
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
STATSD_CLIENT = 'django_statsd.clients.null'
|
||||
STATSD_HOST = None
|
||||
STATSD_PREFIX = None
|
||||
#STATSD_CLIENT = 'django_statsd.clients.normal'
|
||||
#STATSD_HOST = 'graphite'
|
||||
STATSD_PORT = 8125
|
||||
#STATSD_PREFIX = 'tower'
|
||||
STATSD_MAXUDPSIZE = 512
|
||||
|
||||
# If there is an `/etc/tower/settings.py`, include it.
|
||||
# If there is a `/etc/tower/conf.d/*.py`, include them.
|
||||
include(optional('/etc/tower/settings.py'), scope=locals())
|
||||
|
||||
@ -14,6 +14,3 @@ DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
SQL_DEBUG = DEBUG
|
||||
|
||||
# Statistics Gathering
|
||||
STATSD_CLIENT = 'django_statsd.clients.null'
|
||||
STATSD_HOST = 'localhost'
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
Copyright (c) 2010, Mozilla Foundation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of commonware nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -1,5 +0,0 @@
|
||||
BSD and MPL
|
||||
|
||||
Portions of this are from commonware:
|
||||
|
||||
https://github.com/jsocol/commonware/blob/master/LICENSE
|
||||
@ -1,20 +0,0 @@
|
||||
Copyright (c) 2012, James Socol
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@ -23,7 +23,6 @@ django-radius==1.0.0
|
||||
djangorestframework==3.3.2
|
||||
djangorestframework-yaml==1.0.2
|
||||
django-split-settings==0.1.1
|
||||
django-statsd-mozilla==0.3.16
|
||||
django-taggit==0.17.6
|
||||
git+https://github.com/matburt/dm.xmlsec.binding.git@master#egg=dm.xmlsec.binding
|
||||
dogpile.core==0.4.1
|
||||
@ -119,7 +118,6 @@ shade==1.4.0
|
||||
simplejson==3.8.1
|
||||
six==1.9.0
|
||||
slackclient==0.16
|
||||
statsd==3.2.1
|
||||
stevedore==1.10.0
|
||||
suds==0.4
|
||||
unicodecsv==0.14.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user