mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-27 23:51:47 +00:00
fix: rundramatiq
This commit is contained in:
parent
75c4d8d286
commit
e009777c6f
@ -39,7 +39,7 @@ stopwaitsecs = 5
|
|||||||
killasgroup=true
|
killasgroup=true
|
||||||
|
|
||||||
[program:dramatiq]
|
[program:dramatiq]
|
||||||
command=python3 manage.py rundramatiq --no-reload --processes %(ENV_MAX_WORKER_NUM)s --threads 4
|
command=python3 manage.py rundramatiq --processes %(ENV_MAX_WORKER_NUM)s --threads 4
|
||||||
directory=/app/
|
directory=/app/
|
||||||
user=nobody
|
user=nobody
|
||||||
stdout_logfile=/data/log/dramatiq.log
|
stdout_logfile=/data/log/dramatiq.log
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
import os
|
import os
|
||||||
|
from utils.shortcuts import get_env
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'HOST': '127.0.0.1',
|
'HOST': get_env('POSTGRES_HOST', '127.0.0.1'),
|
||||||
'PORT': 5435,
|
'PORT': get_env('POSTGRES_PORT', '5435'),
|
||||||
'NAME': "onlinejudge",
|
'NAME': get_env('POSTGRES_DB', 'onlinejudge'),
|
||||||
'USER': "onlinejudge",
|
'USER': get_env('POSTGRES_USER', 'onlinejudge'),
|
||||||
'PASSWORD': 'onlinejudge'
|
'PASSWORD': get_env('POSTGRES_PASSWORD', 'onlinejudge')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
REDIS_CONF = {
|
REDIS_CONF = {
|
||||||
"host": "127.0.0.1",
|
'host': get_env('REDIS_HOST', '127.0.0.1'),
|
||||||
"port": "6380"
|
'port': get_env('REDIS_PORT', '6380')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user