我们有一个 Kiba 管道,我们需要在作业结束后执行一些任务,无论是否有错误(整个管道不会失败,我们只是有几个验证错误或类似错误)。
这就是文档所说的:
:warning: 如果在它们之前发生错误,则不会调用后处理器。 https://github.com/thbar/kiba/wiki/Implementing-pre-and-post-processors
这是推荐的方法吗:
Kiba.run(
Kiba.parse do
source(...)
transform(...)
destination(....)
post_process do
# we cannot do it here, because it won't get called
end
end
)
# is this the location to do it?
Job.some_special_cleanup_task
谢谢!
PS是什么意思:
如果在它们之前发生错误,则不会调用后处理器。
这是否意味着如果错误发生并且没有被救出?