mirror of https://github.com/jumpserver/jumpserver
perf: display migrate log
parent
b1e958d806
commit
ad5e88f1e3
|
@ -83,9 +83,9 @@ if DEBUG:
|
||||||
DEBUG_HOST_PORTS = ['{}:{}'.format(host, port) for host in DEBUG_HOSTS for port in DEBUG_PORT]
|
DEBUG_HOST_PORTS = ['{}:{}'.format(host, port) for host in DEBUG_HOSTS for port in DEBUG_PORT]
|
||||||
ALLOWED_DOMAINS.extend(DEBUG_HOST_PORTS)
|
ALLOWED_DOMAINS.extend(DEBUG_HOST_PORTS)
|
||||||
|
|
||||||
print("ALLOWED_HOSTS: ", )
|
# print("ALLOWED_HOSTS: ", )
|
||||||
for host in ALLOWED_DOMAINS:
|
# for host in ALLOWED_DOMAINS:
|
||||||
print(' - ' + host.lstrip('.'))
|
# print(' - ' + host.lstrip('.'))
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
|
7
jms
7
jms
|
@ -84,11 +84,12 @@ def expire_caches():
|
||||||
def perform_db_migrate():
|
def perform_db_migrate():
|
||||||
logging.info("Check database structure change ...")
|
logging.info("Check database structure change ...")
|
||||||
logging.info("Migrate model change to database ...")
|
logging.info("Migrate model change to database ...")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
management.call_command('migrate')
|
management.call_command('migrate')
|
||||||
except Exception:
|
except Exception as e:
|
||||||
logging.error('Perform migrate failed, exit', exc_info=True)
|
logging.error('Perform migrate failed')
|
||||||
sys.exit(11)
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def collect_static():
|
def collect_static():
|
||||||
|
|
Loading…
Reference in New Issue