def _client_worker_process(factory, input_queue, output_queue, is_shutdown):
 log.info('starting up worker : %s', threading.current_thread())
 client = factory()
 while (not is_shutdown.is_set()):
  try:
   workitem = input_queue.get(timeout=1)
   log.debug('dequeue worker request: %s', workitem)
   if (not workitem):
    continue
   try:
    log.debug('executing request on thread: %s', workitem)
    result = client.execute(workitem.request)
    output_queue.put(WorkResponse(False, workitem.work_id, result))
   except Exception as exception:
    log.exception('error in worker thread: %s', threading.current_thread())
    output_queue.put(WorkResponse(True, workitem.work_id, exception))
  except Exception as ex:
   pass
 log.info('request worker shutting down: %s', threading.current_thread())

def _client_worker_process ( factory , input_queue , output_queue , is_shutdown ) : log . info ( 'starting up worker : %s' , threading . current_thread ( ) ) client = factory ( ) while ( not is_shutdown . is_set ( ) ) : try : workitem = input_queue . get ( timeout = 1 ) log . debug ( 'dequeue worker request: %s' , workitem ) if ( not workitem ) : continue try : log . debug ( 'executing request on thread: %s' , workitem ) result = client . execute ( workitem . request ) output_queue . put ( WorkResponse ( False , workitem . work_id , result ) ) except Exception as exception : log . exception ( 'error in worker thread: %s' , threading . current_thread ( ) ) output_queue . put ( WorkResponse ( True , workitem . work_id , exception ) ) except Exception as ex : pass log . info ( 'request worker shutting down: %s' , threading . current_thread ( ) )
this worker process takes input requests .