Skip to content

Commit

Permalink
remove signal that was causing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham4401 committed Nov 20, 2023
1 parent 79c58f0 commit f5d5afc
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions server/apps/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@
import time

from celery import Task, shared_task
from celery.signals import task_prerun
from django.core.cache import cache

logger = logging.getLogger(__name__)


@task_prerun.connect
def cache_status_as_received(sender, task_id, task, args, kwargs, **kw):
cached_state = cache.get(task_id)
if cached_state is None:
cache.set(
task_id,
{"status": "Received", "taskName": task.name, "taskId": task_id},
)


@shared_task(bind=True, name="example task")
def example_task(self: Task):
cache.set(
Expand Down

0 comments on commit f5d5afc

Please sign in to comment.