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,6 +273,7 @@ def update_geoip(force=False):
def init(): def init():
if not settings.RELOADER_RUNNING: if not settings.RELOADER_RUNNING:
load_config() load_config()
if settings.RELOAD_CONFIG:
thread.start_new_thread(reloader_thread, ()) thread.start_new_thread(reloader_thread, ())
def shutdown(): def shutdown():

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

@ -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"