小编use*_*414的帖子

Celery 存储结果多长时间,我可以限制这个时间吗

我想使用 \xd0\xa1elere 和 Redis 作为后端,我将有一个创建任务、存储 id 然后再次运行并检查状态的流程。\n如何清除我不再需要的结果和状态,我可以吗限制 \xd0\xa1elery 存储结果的时间?
\n像这样:

\n
task_id = task.apply_async().id\nstore_id(task_id) # my code, doesn't relate to celery\n
Run Code Online (Sandbox Code Playgroud)\n

然后我将获取任务并检查状态:

\n
task_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\n
Run Code Online (Sandbox Code Playgroud)\n

celery

3
推荐指数
1
解决办法
2429
查看次数

标签 统计

celery ×1