Django-RQ 项目实现了 Django 框架和 RQ 消息队列之间的集成。
示例代码:
from django_rq import job @job def long_running_func(): pass long_running_func.delay() # Enqueue function in "default" queue @job('high') def long_running_func(): pass long_running_func.delay() # Enqueue function in "high" queue