#NEWLINE# def on_shutter( self , state , commit_every = 100 ) : #NEWLINE# #INDENT# def _handle_tasks( ) : #NEWLINE# #INDENT# for ( i , task ) in enumerate ( state . tasks . items ( ) ) : #NEWLINE# #INDENT# self . handle_task ( task ) #NEWLINE# #UNINDENT# #UNINDENT# for worker in state . workers . items ( ) : #NEWLINE# #INDENT# self . handle_worker ( self ) #NEWLINE# #UNINDENT# _handle_tasks ( )