Skip to content

Commit 7bc98b3

Browse files
committed
Configure RQ settings
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 21d9d5a commit 7bc98b3

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ python-dateutil==2.8.2
9292
python-dotenv==0.20.0
9393
pytz==2022.1
9494
PyYAML==6.0.1
95+
redis==5.0.1
9596
requests==2.32.0
9697
restructuredtext-lint==1.4.0
98+
rq==1.15.1
9799
saneyaml==0.6.0
98100
semantic-version==2.9.0
99101
six==1.16.0

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ install_requires =
9494

9595
#pipeline
9696
aboutcode.pipeline>=0.1.0
97+
django-rq==2.10.1
98+
rq-scheduler==0.13.1
9799

98100
#vulntotal
99101
python-dotenv

vulnerablecode/settings.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
# required for Django collectstatic discovery
8585
"drf_spectacular_sidecar",
8686
"django_recaptcha",
87+
"django_rq",
8788
)
8889

8990
RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY", "")
@@ -362,3 +363,15 @@
362363
"handlers": ["console"],
363364
"level": "ERROR",
364365
}
366+
367+
368+
VULNERABLECODE_ASYNC = True
369+
VULNERABLECODE_PIPELINE_TIMEOUT = "24h"
370+
RQ_QUEUES = {
371+
"default": {
372+
"HOST": env.str("VULNERABLECODE_REDIS_HOST", default="localhost"),
373+
"PORT": env.str("VULNERABLECODE_REDIS_PORT", default="6379"),
374+
"PASSWORD": env.str("VULNERABLECODE_REDIS_PASSWORD", default=""),
375+
"DEFAULT_TIMEOUT": env.int("VULNERABLECODE_REDIS_DEFAULT_TIMEOUT", default=360),
376+
}
377+
}

0 commit comments

Comments
 (0)