Verified Commit 188bbcc7 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Remove Celery dependency

parent 78af8b13
from django.utils import timezone
from thaliawebsite import celery_app
from django.conf import settings
def schedule_task(task, args=(), eta=timezone.now()):
if settings.CELERY_ENABLED:
result = task.apply_async(args, eta=eta)
return result.id
return None
def revoke_task(task_id):
if settings.CELERY_ENABLED:
celery_app.control.revoke(task_id)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment