#NEWLINE# def start_server( self ) : #NEWLINE# #INDENT# self . server_pid = os . fork ( ) #NEWLINE# if ( not self . server_pid ) : #NEWLINE# #INDENT# server = GearmanServer ( ) #NEWLINE# server . start ( ) #NEWLINE# sys . exit ( ) #NEWLINE# #UNINDENT# connection = GearmanConnection ( job_servers [ 0 ] ) #NEWLINE# for i in range ( 10 ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# connection . connect ( ) #NEWLINE# #UNINDENT# except GearmanConnection . ConnectionError : #NEWLINE# #INDENT# time . sleep ( 0.5 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# connection . close ( )