#NEWLINE# def _publisher( publish , queue ) : #NEWLINE# #INDENT# 'Calls a publish method that fills queue with jobs.\n\n    :param publish: method that fills the queue\n    :param queue: deque object to be filled by the publish() method\n    ' #NEWLINE# try : #NEWLINE# #INDENT# publish ( queue ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# LOG . warning ( ( _ ( 'Failed to publish a task to the queue: %s' ) % publish ) ) #NEWLINE# if logging . is_debug ( ) : #NEWLINE# #INDENT# LOG . exception ( e )