mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Gunicorn changes on server.
This commit is contained in:
parent
29225a74e3
commit
0e0940317f
3 changed files with 4 additions and 15 deletions
12
gunicorn.py
12
gunicorn.py
|
@ -1,12 +0,0 @@
|
|||
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"
|
||||
logfile = "/home/conesus/newsblur/logs/production.log"
|
||||
loglevel = "debug"
|
||||
workers = numCPUs() #* 2 + 1
|
|
@ -72,7 +72,7 @@ MIDDLEWARE_CLASSES = (
|
|||
'django.middleware.gzip.GZipMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.cache.CacheMiddleware',
|
||||
# 'django.middleware.cache.CacheMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'apps.profile.middleware.LastSeenMiddleware',
|
||||
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
|
@ -195,6 +195,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.sites',
|
||||
'django.contrib.admin',
|
||||
'django_extensions',
|
||||
'gunicorn',
|
||||
'djcelery',
|
||||
'compress',
|
||||
'apps.rss_feeds',
|
||||
|
@ -267,6 +268,7 @@ CELERY_DISABLE_RATE_LIMITS = True
|
|||
# = Configurations =
|
||||
# ==================
|
||||
|
||||
from gunicorn_conf import *
|
||||
from local_settings import *
|
||||
|
||||
COMPRESS = not DEBUG
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/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
|
||||
sudo /etc/init.d/gunicorn restart
|
||||
sudo supervisorctl restart gunicorn
|
||||
echo '----\n'
|
||||
tail -f /home/conesus/newsblur/logs/newsblur.log
|
Loading…
Add table
Reference in a new issue