dont reload config in manage.py commands, fixes #1619

This commit is contained in:
j 2013-07-15 12:49:05 +00:00
parent b47b8b14fb
commit d62460e5fe
5 changed files with 9 additions and 2 deletions

View file

@ -273,7 +273,8 @@ def update_geoip(force=False):
def init(): def init():
if not settings.RELOADER_RUNNING: if not settings.RELOADER_RUNNING:
load_config() load_config()
thread.start_new_thread(reloader_thread, ()) if settings.RELOAD_CONFIG:
thread.start_new_thread(reloader_thread, ())
def shutdown(): def shutdown():
if settings.RELOADER_RUNNING: if settings.RELOADER_RUNNING:

View file

@ -1,7 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4 # vi:si:et:sw=4:sts=4:ts=4
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.conf import settings
settings.RELOAD_CONFIG = False
import app.monkey_patch import app.monkey_patch
from ... import models from ... import models

View file

@ -6,6 +6,7 @@ from django.core.management.base import BaseCommand
from django.db import connection, transaction from django.db import connection, transaction
from django.conf import settings from django.conf import settings
settings.RELOAD_CONFIG = False
import app.monkey_patch import app.monkey_patch
from ... import models from ... import models

View file

@ -5,7 +5,9 @@ from optparse import make_option
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.db import connection, transaction from django.db import connection, transaction
from django.db.models import fields from django.db.models import fields
from django.conf import settings
settings.RELOAD_CONFIG = False
import app.monkey_patch import app.monkey_patch
from ... import models from ... import models
import clip.models import clip.models

View file

@ -172,7 +172,7 @@ BROKER_PORT = 5672
BROKER_USER = "pandora" BROKER_USER = "pandora"
BROKER_PASSWORD = "box" BROKER_PASSWORD = "box"
BROKER_VHOST = "/pandora" BROKER_VHOST = "/pandora"
SEND_CELERY_ERROR_EMAILS=False SEND_CELERY_ERROR_EMAILS = False
#with apache x-sendfile or lighttpd set this to True #with apache x-sendfile or lighttpd set this to True
XSENDFILE = False XSENDFILE = False
@ -182,6 +182,7 @@ XACCELREDIRECT = False
SITE_CONFIG = join(PROJECT_ROOT, 'config.jsonc') SITE_CONFIG = join(PROJECT_ROOT, 'config.jsonc')
DEFAULT_CONFIG = join(PROJECT_ROOT, 'config.pandora.jsonc') DEFAULT_CONFIG = join(PROJECT_ROOT, 'config.pandora.jsonc')
RELOAD_CONFIG = True
#used if CONFIG['video']['download'] is set #used if CONFIG['video']['download'] is set
TRACKER_URL="udp://tracker.openbittorrent.com:80" TRACKER_URL="udp://tracker.openbittorrent.com:80"