#NEWLINE# def act( self ) : #NEWLINE# #INDENT# workerName = self . get ( 'name' , '' ) #NEWLINE# if ( not workerName ) : #NEWLINE# #INDENT# logger . error ( 'empty worker name {}' . format ( self . decodedMessage ) ) #NEWLINE# return #NEWLINE# #UNINDENT# logger . info ( 'worker {} unregistering' . format ( workerName ) ) #NEWLINE# if ( workerName in admin . workers ) : #NEWLINE# #INDENT# engine = admin . workers [ workerName ] #NEWLINE# engine . _setattr ( Engine . FSTATUS , cons . STATUS_INACTIVE ) #NEWLINE# engine . _setattr ( Engine . FENDTIME , datetime . datetime . now ( ) ) #NEWLINE# engine . save ( )