switch back to wsgi, remove uvicorn
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
from django.core.asgi import get_asgi_application
|
||||
from django_simple_task import django_simple_task_middlware
|
||||
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tubesync.settings')
|
||||
application = django_simple_task_middlware(get_asgi_application())
|
||||
application = get_asgi_application()
|
||||
|
||||
@@ -5,7 +5,7 @@ import multiprocessing
|
||||
def get_num_workers():
|
||||
cpu_workers = multiprocessing.cpu_count() * 2 + 1
|
||||
try:
|
||||
num_workers = int(os.getenv('GUNICORN_WORKERS', 1))
|
||||
num_workers = int(os.getenv('GUNICORN_WORKERS', 2))
|
||||
except ValueError:
|
||||
num_workers = cpu_workers
|
||||
if 0 > num_workers > cpu_workers:
|
||||
|
||||
@@ -18,7 +18,6 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'sass_processor',
|
||||
'django_simple_task',
|
||||
'background_task',
|
||||
'common',
|
||||
'sync',
|
||||
@@ -114,7 +113,11 @@ HEALTHCHECK_FIREWALL = True
|
||||
HEALTHCHECK_ALLOWED_IPS = ('127.0.0.1',)
|
||||
|
||||
|
||||
DJANGO_SIMPLE_TASK_WORKERS = 2
|
||||
MAX_ATTEMPTS = 10 # Number of times tasks will be retried
|
||||
MAX_RUN_TIME = 1800 # Maximum amount of time in seconds a task can run
|
||||
BACKGROUND_TASK_RUN_ASYNC = True # Run tasks async in the background
|
||||
BACKGROUND_TASK_ASYNC_THREADS = 2 # Number of async tasks to run at once
|
||||
BACKGROUND_TASK_PRIORITY_ORDERING = 'DESC' # Process high priority tasks first
|
||||
|
||||
|
||||
SOURCES_PER_PAGE = 25
|
||||
|
||||
Reference in New Issue
Block a user