add final_line_count to EOF websocket

This commit is contained in:
AlanCoding
2018-05-21 15:21:35 -04:00
parent 86616c4062
commit f54ac776cd
2 changed files with 3 additions and 2 deletions

View File

@@ -162,6 +162,7 @@ class CallbackBrokerWorker(ConsumerMixin):
if body.get('event') == 'EOF':
try:
final_line_count = body.get('final_line_count', 0)
logger.info('Event processing is finished for Job {}, sending notifications'.format(job_identifier))
# EOF events are sent when stdout for the running task is
# closed. don't actually persist them to the database; we
@@ -169,7 +170,7 @@ class CallbackBrokerWorker(ConsumerMixin):
# approximation for when a job is "done"
emit_channel_notification(
'jobs-summary',
dict(group_name='jobs', unified_job_id=job_identifier)
dict(group_name='jobs', unified_job_id=job_identifier, final_line_count=final_line_count)
)
# Additionally, when we've processed all events, we should
# have all the data we need to send out success/failure