tester in docker works

This commit is contained in:
Egor Matveev
2021-11-02 23:33:38 +03:00
parent a45d3e104b
commit 928cc4489d
35 changed files with 321 additions and 184 deletions

View File

@@ -1,3 +0,0 @@
from .celery import app as celery
__all__ = ('celery',)

View File

@@ -1,17 +0,0 @@
import os
from celery import Celery
# Set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Sprint.settings')
app = Celery('Sprint')
# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix.
app.config_from_object('django.conf:settings', namespace='CELERY')
# Load task modules from all registered Django apps.
app.autodiscover_tasks()

View File

@@ -84,11 +84,11 @@ WSGI_APPLICATION = "Sprint.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "postgres",
"NAME": "sprint",
"USER": "postgres",
"PASSWORD": "password",
"HOST": "0.0.0.0",
"PORT": "5432",
"HOST": "postgres",
"PORT": 5432,
}
}
@@ -141,6 +141,12 @@ MEDIA_ROOT = os.path.join(BASE_DIR, "media")
DATA_ROOT = os.path.join(BASE_DIR, "data")
SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions")
SOLUTIONS_ROOT_EXTERNAL = "/Users/egormatveev/Sprint/data/solutions"
RABBIT_HOST = "rabbitmq"
RABBIT_PORT = 5672
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "Main/static"),
]
@@ -149,12 +155,6 @@ STATICFILES_DIRS = [
# Authentication backends
AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",)
# Celery Configuration Options
CELERY_TIMEZONE = "Europe/Moscow"
CELERY_TASK_TRACK_STARTED = True
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/0'
CONSTS = {
"online_status": "Online",
"in_queue_status": "In queue",