Skip to content

Commit 086717e

Browse files
committed
Register the update_vulnerabilities for testing
Signed-off-by: tdruez <[email protected]>
1 parent ec2c7ed commit 086717e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dje/management/commands/cronjobs.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import django_rq
2222
from rq.cron import CronScheduler
2323

24+
from dje.tasks import update_vulnerabilities
25+
2426

2527
class Command(BaseCommand):
2628
help = (
@@ -44,7 +46,13 @@ def start_scheduler(self, connection):
4446
cron = CronScheduler(connection=connection, logging_level="INFO")
4547

4648
# Register jobs
47-
cron.register(print, queue_name="default", cron="* * * * *")
49+
# cron.register(print, queue_name="default", cron="* * * * *")
50+
cron.register(
51+
func=update_vulnerabilities,
52+
queue_name="default",
53+
# cron=settings.DEJACODE_VULNERABILITIES_CRON, # 3am daily by default
54+
cron="0 * * * *", # Every hour
55+
)
4856

4957
# Start the scheduler (this will block until interrupted)
5058
try:

0 commit comments

Comments
 (0)