1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

Merge pull request #5656 from ryanpetrello/pygments-minus-minus

remove some unnecessary callback receiver debugging code

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-01-14 19:55:01 +00:00 committed by GitHub
commit df5231f527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,29 +90,11 @@ class CallbackBrokerWorker(BaseWorker):
}
job_identifier = 'unknown job'
job_key = 'unknown'
for key, cls in event_map.items():
if key in body:
job_identifier = body[key]
job_key = key
break
if settings.DEBUG:
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import Terminal256Formatter
from pprint import pformat
if body.get('event') == 'EOF':
event_thing = 'EOF event'
else:
event_thing = 'event {}'.format(body.get('counter', 'unknown'))
logger.debug('Callback worker received {} for {} {}'.format(
event_thing, job_key[:-len('_id')], job_identifier
))
logger.debug('Body: {}'.format(
highlight(pformat(body, width=160), PythonLexer(), Terminal256Formatter(style='friendly'))
)[:1024 * 4])
if body.get('event') == 'EOF':
try:
final_counter = body.get('final_counter', 0)