#NEWLINE# def _on_finish( self ) : #NEWLINE# #INDENT# sent_events = self . _channel . sent_messages . get ( _KIND_EVENT , 0 ) #NEWLINE# if sent_events : #NEWLINE# #INDENT# message = { #NEWLINE# #INDENT# 'created_on' : timeutils . utcnow ( ) , #NEWLINE# 'kind' : _KIND_COMPLETE_ME , #NEWLINE# #UNINDENT# } #NEWLINE# if self . _channel . put ( message ) : #NEWLINE# #INDENT# watch = timeutils . StopWatch ( ) #NEWLINE# watch . start ( ) #NEWLINE# self . _barrier . wait ( ) #NEWLINE# LOG . trace ( "Waited %s seconds until task '%s' %s emitted notifications were depleted" , watch . elapsed ( ) , self . _task , watch )