Browse Source

Cleanup aspnet

Hamilton Turner 10 years ago
parent
commit
a6beeab17a
1 changed files with 1 additions and 7 deletions
  1. 1 7
      frameworks/C#/aspnet/setup_nginx.py

+ 1 - 7
frameworks/C#/aspnet/setup_nginx.py

@@ -17,9 +17,6 @@ def start(args, logfile, errfile):
   # nginx
   workers = 'worker_processes ' + str(args.max_threads) + ';'
   logfile.write("Setting up workers as %s\n\n" % workers)
-  errfile.write("Does this even work?")
-  print "Hello there?"
-  sys.stdout.write("Testing stdout write")
   subprocess.check_call("echo Hello there", shell=True, stderr=errfile, stdout=logfile);
   command = 'echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf'
   logfile.write("Using command %s" % command)
@@ -30,15 +27,13 @@ def start(args, logfile, errfile):
   # To debug, use --printlog --verbose --loglevels=All
   for port in range(9001, 9001 + args.max_threads):
     subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:%s/src --socket=tcp:127.0.0.1:%s " % (args.directory, port), shell=True, cwd="aspnet", stderr=errfile, stdout=logfile)
-  
-  return 0
 
 def stop(logfile, errfile):
   if os.name == 'nt':
     return 0
   
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
-  # subprocess.check_call("rm -f $TROOT/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f $TROOT/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
   #
   # stop mono
   #
@@ -48,4 +43,3 @@ def stop(logfile, errfile):
     if 'mono-server' in line and not 'run-ci' in line and not 'run-tests' in line:
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
-  return 0