@task
@needs(['reset_test_database', 'clear_mongo', 'load_bok_choy_data', 'load_courses'])
@might_call('start_servers')
@cmdopts([BOKCHOY_FASTTEST], share_with=['start_servers'])
@timed
def prepare_bokchoy_run(options):
 if (not options.get('fasttest', False)):
  print colorize('green', 'Generating optimized static assets...')
  if (options.get('log_dir') is None):
   call_task('update_assets', args=['--settings', 'test_static_optimized'])
  else:
   call_task('update_assets', args=['--settings', 'test_static_optimized', '--collect-log', options.log_dir])
 msg = colorize('green', 'Confirming servers are running...')
 print msg
 start_servers()

@ task @ needs ( [ 'reset_test_database' , 'clear_mongo' , 'load_bok_choy_data' , 'load_courses' ] ) @ might_call ( 'start_servers' ) @ cmdopts ( [ BOKCHOY_FASTTEST ] , share_with = [ 'start_servers' ] ) @ timed def prepare_bokchoy_run ( options ) : if ( not options . get ( 'fasttest' , False ) ) : print colorize ( 'green' , 'Generating optimized static assets...' ) if ( options . get ( 'log_dir' ) is None ) : call_task ( 'update_assets' , args = [ '--settings' , 'test_static_optimized' ] ) else : call_task ( 'update_assets' , args = [ '--settings' , 'test_static_optimized' , '--collect-log' , options . log_dir ] ) msg = colorize ( 'green' , 'Confirming servers are running...' ) print msg start_servers ( )
sets up and starts servers for a bok choy run .