我想使用 \xd0\xa1elere 和 Redis 作为后端,我将有一个创建任务、存储 id 然后再次运行并检查状态的流程。\n如何清除我不再需要的结果和状态,我可以吗限制 \xd0\xa1elery 存储结果的时间?
\n像这样:
task_id = task.apply_async().id\nstore_id(task_id) # my code, doesn't relate to celery\nRun Code Online (Sandbox Code Playgroud)\n然后我将获取任务并检查状态:
\ntask_id = get_id() # my code, doesn't relate to celery\ntask = AsyncResult(task_id)\n# do something with task\n# now I don't need Celery to store this result\nRun Code Online (Sandbox Code Playgroud)\n