parameters: (shell_objects)
docstring: Run the server in the foreground with the options given to the command line
docstring_summary: Run the server in the foreground with the options given to the command line
docstring_tokens: Run the server in the foreground with the options given to the command line
function: def runserver_action(shell_objects):
      """Run the server in the foreground with the options given to the command line"""
      try:
          if 'runserver' in sys.argv or len(windmill.settings['controllers']) is 0:
              print 'Server running...'
          if windmill.settings['EXIT_ON_DONE'] and not windmill.settings['JAVASCRIPT_TEST_DIR']:
              while windmill.block_exit or ( 
                      len(shell_objects['httpd'].controller_queue.queue) is not 0 ) or (
                      len(shell_objects['httpd'].test_resolution_suite.unresolved) is not 0 ):
                  sleep(.25)
          elif ( windmill.settings['RUN_TEST'] ):
              windmill.runserver_running = True
              while windmill.runserver_running:
                  sleep(.25)
  
          else:
              windmill.runserver_running = True
              while windmill.runserver_running:
                  sleep(.25)
  
          teardown(shell_objects)
          if windmill.test_has_failed:
              sys.exit(1)
  
      except KeyboardInterrupt:
          teardown(shell_objects)
          sys.exit(1)
function_tokens: def runserver_action ( shell_objects ) : try : if 'runserver' in sys . argv or len ( windmill . settings [ 'controllers' ] ) is 0 : print 'Server running...' if windmill . settings [ 'EXIT_ON_DONE' ] and not windmill . settings [ 'JAVASCRIPT_TEST_DIR' ] : while windmill . block_exit or ( len ( shell_objects [ 'httpd' ] . controller_queue . queue ) is not 0 ) or ( len ( shell_objects [ 'httpd' ] . test_resolution_suite . unresolved ) is not 0 ) : sleep ( .25 ) elif ( windmill . settings [ 'RUN_TEST' ] ) : windmill . runserver_running = True while windmill . runserver_running : sleep ( .25 ) else : windmill . runserver_running = True while windmill . runserver_running : sleep ( .25 ) teardown ( shell_objects ) if windmill . test_has_failed : sys . exit ( 1 ) except KeyboardInterrupt : teardown ( shell_objects ) sys . exit ( 1 )