我的 python redis 队列中有一个嵌套的作业结构。首先执行 rncopy 作业。完成后,接下来是 3 个相关的注册作业。当所有这 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))
Run Code Online (Sandbox Code Playgroud)
不幸的是,似乎多作业依赖功能从未合并到主版本中。我看到目前 git 上有两个拉取请求。有我可以使用的解决方法吗?
很抱歉未能提供可重现的示例。
如何更改以下字符串以在R中不包含多个连续的问号/其他特殊字符?
"Nice one!!!"
Run Code Online (Sandbox Code Playgroud)
应该成为
"Nice one!"
Run Code Online (Sandbox Code Playgroud)
和
"Whazzup????!!"
Run Code Online (Sandbox Code Playgroud)
应该成为
"Whazzup?!"
Run Code Online (Sandbox Code Playgroud)
我试验了多个正则表达式命令但没有成功.显然我可以用一个替换两个问号,但我希望它与特殊字符的数量无关.
这与标记的副本不同,因为它处理特殊字符.