mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-23 00:11:48 -05:00
Improve handling of 0 and negative thresholds in the profile_sql command
- output a profiling disabled message when appropriate - specify that we are doing SQL profiling in the enabled case - treat negative thresholds the same as zero, disabling profiling
This commit is contained in:
@@ -313,7 +313,7 @@ def delete_project_files(project_path):
|
||||
|
||||
@task(queue='tower_broadcast_all')
|
||||
def profile_sql(threshold=1, minutes=1):
|
||||
if threshold == 0:
|
||||
if threshold <= 0:
|
||||
cache.delete('awx-profile-sql-threshold')
|
||||
logger.error('SQL PROFILING DISABLED')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user