mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复dev 无法启动celery
This commit is contained in:
parent
2a87af6172
commit
d315c01133
|
|
@ -26,7 +26,7 @@ class Command(BaseCommand):
|
|||
service = options.get('service')
|
||||
os.environ.setdefault('CELERY_NAME', ','.join(service))
|
||||
server_hostname = os.environ.get("SERVER_HOSTNAME")
|
||||
if os.getuid() == 0:
|
||||
if hasattr(os, 'getuid') and os.getuid() == 0:
|
||||
os.environ.setdefault('C_FORCE_ROOT', '1')
|
||||
if not server_hostname:
|
||||
server_hostname = '%h'
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ LOGGING = {
|
|||
},
|
||||
'sqlalchemy': {
|
||||
'handlers': ['console', 'file', 'syslog'],
|
||||
'level': LOG_LEVEL,
|
||||
'level': "ERROR",
|
||||
'propagate': False,
|
||||
},
|
||||
'django.db.backends': {
|
||||
|
|
@ -119,9 +119,6 @@ LOGGING = {
|
|||
'level': "DEBUG",
|
||||
'propagate': False,
|
||||
},
|
||||
'sqlalchemy': {'handlers': ['console', 'file'],
|
||||
'level': "ERROR",
|
||||
'propagate': False, }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue