Merge branch 'master' of github.com:samuelclay/NewsBlur

This commit is contained in:
Samuel Clay 2010-06-27 21:04:15 -04:00
commit 55181e033e
3 changed files with 13 additions and 2 deletions

View file

@ -16,4 +16,4 @@ class Command(BaseCommand):
for f in feeds.iterator():
f.calculate_subscribers(verbose=options['verbose'])

10
gunicorn.py Normal file
View file

@ -0,0 +1,10 @@
import os
def numCPUs():
if not hasattr(os, "sysconf"):
raise RuntimeError("No sysconf detected.")
return os.sysconf("SC_NPROCESSORS_ONLN")
bind = "127.0.0.1:8000"
pidfile = "/tmp/gunicorn_newsblur.pid"
workers = numCPUs() # * 2 + 1

View file

@ -1,2 +1,3 @@
#!/bin/sh
ps aux | grep 8080 | egrep -v 'grep' | awk '{print $2}' | xargs kill; ./manage.py runfcgi method=threaded host=127.0.0.1 port=8080
#ps aux | grep 8080 | egrep -v 'grep' | awk '{print $2}' | xargs kill; ./manage.py runfcgi method=threaded host=127.0.0.1 port=8080
sudo /etc/init.d/gunicorn stop && sleep 1 && sudo /etc/init.d/gunicorn start &