Refactoring fetcher, working feeds and raw url writer

This commit is contained in:
Luciano Gervasoni
2025-03-12 17:56:40 +01:00
parent e124dbc21a
commit 61c31ee9aa
24 changed files with 2085 additions and 194 deletions

View File

@@ -1,10 +1,10 @@
import django_rq
from django.http import JsonResponse
from .tasks import task_1
from .tasks import background_task
def trigger_task(request):
"""View that enqueues a task."""
queue = django_rq.get_queue('default') # Get the default queue
job = queue.enqueue(task_1, "Hello from Django RQ!")
job = queue.enqueue(background_task, "Hello from Django RQ!")
return JsonResponse({"message": "Task has been enqueued!", "job_id": job.id})