django_simple_task

django_simple_task.defer(func: Union[Callable[[Any], Awaitable[T_co]], Callable], arguments: Optional[Dict[KT, VT]] = None, *, options: Optional[Dict[KT, VT]] = None)

Adds a function or coroutine function to the task queue

Parameters:
  • func – function or coroutine function to be enqueued
  • arguments – optional. In the format of {“args”: [], “kwargs”: {}}
  • options – optional. In the format of { “thread_sensitive”: bool, this gets passed to asgiref.sync.sync_to_async, defaults to False.}
django_simple_task.django_simple_task_middlware(app, *, asgi_version=3)