pythonrq如何在其他多个作业完成时触发一个作业?多工作依赖性工作区?

2024-09-20 06:48:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我在python redis队列中有一个嵌套的作业结构。首先执行rncopy作业。完成后,3个依亲登记工作如下。当这三个作业的计算完成后,我想触发一个作业,向我的前端发送一个websocket通知。在

我当前的尝试:

    rncopy = redisqueue.enqueue(raw_nifti_copymachine, patientid, imagepath, timeout=6000)
    t1c_reg = redisqueue.enqueue(modality_registrator, patientid, "t1c", timeout=6000, depends_on=rncopy)
    t2_reg = redisqueue.enqueue(modality_registrator, patientid, "t2", timeout=6000, depends_on=rncopy)
    fla_reg = redisqueue.enqueue(modality_registrator, patientid, "fla", timeout=6000, depends_on=rncopy)
    notify = redisqueue.enqueue(print, patient_finished, patientid, timeout=6000, depends_on=(t1c_reg, t2_reg, fla_reg))

不幸的是,多作业依赖特性似乎从未合并到主控形状中。我看到git上目前有两个pull请求。有没有我可以使用的解决方法?在

很抱歉未能提供一个可复制的例子。在


Tags: redison作业timeoutregdependst2redisqueue