File: settings.py

package info (click to toggle)
python-django-tasks-rq 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 160 kB
  • sloc: python: 682; sh: 5; makefile: 4
file content (39 lines) | stat: -rw-r--r-- 644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import sys

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

IN_TEST = "IN_TEST" in os.environ or (len(sys.argv) > 1 and sys.argv[1] == "test")

ALLOWED_HOSTS = ["*"]

INSTALLED_APPS = [
    "django_tasks_rq",
    "django_rq",
    "tests",
]

SECRET_KEY = "abcde12345"

USE_TZ = True

if not IN_TEST:
    DEBUG = True

TASKS = {
    "default": {
        "BACKEND": "django_tasks_rq.RQBackend",
        "QUEUES": ["default", "queue-1"],
    }
}

RQ_QUEUES = {
    "default": {
        "HOST": "localhost",
        "PORT": 6379,
    },
    "queue-1": {
        "HOST": "localhost",
        "PORT": 6379,
    },
}