#NEWLINE# def execute( self , arbiter , props ) : #NEWLINE# #INDENT# watcher = self . _get_watcher ( arbiter , props . get ( 'name' ) ) #NEWLINE# if nb . singleton : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'numprocesses' : watcher . numprocesses , #NEWLINE# 'singleton' : True , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# nb = props . get ( 'nb' , 1 ) #NEWLINE# resp = TransformableFuture ( ) #NEWLINE# resp . set_upstream_future ( watcher . incr ( nb ) ) #NEWLINE# resp . set_transform_function ( ( lambda x : { #NEWLINE# #INDENT# 'numprocesses' : x , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# return resp