kopia lustrzana https://github.com/OpenDroneMap/WebODM
Skip boot code while migrating (speed-up, permission issue fix)
rodzic
14b6a355e2
commit
83fd1e9336
|
@ -25,7 +25,7 @@ from webodm.wsgi import booted
|
|||
def boot():
|
||||
# booted is a shared memory variable to keep track of boot status
|
||||
# as multiple gunicorn workers could trigger the boot sequence twice
|
||||
if not settings.DEBUG and booted.value: return
|
||||
if (not settings.DEBUG and booted.value) or settings.MIGRATING: return
|
||||
|
||||
booted.value = True
|
||||
logger = logging.getLogger('app.logger')
|
||||
|
|
|
@ -45,6 +45,7 @@ with open(os.path.join(BASE_DIR, 'package.json')) as package_file:
|
|||
VERSION = data['version']
|
||||
|
||||
TESTING = sys.argv[1:2] == ['test']
|
||||
MIGRATING = sys.argv[1:2] == ['migrate']
|
||||
WORKER_RUNNING = sys.argv[2:3] == ["worker"]
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on a public facing server!
|
||||
|
|
Ładowanie…
Reference in New Issue