说我有一个具有以下依赖关系结构的任务

class ParentTask(luigi.Task):
    def requires(self):
        return [ChildTask(classLevel=x) for x in self.class_level_list]
    def run(self):
        yadayda

子任务本身运行良好。父级正确检查所有子级任务的完成状态。但是,当第一个子任务完成时,调度程序会将父任务标记为已完成。并显示以下消息:
   Scheduled 15 tasks of which:
* 3 ran successfully:
    - 1 CleanRecord(...)
    - 1 EstimateQuestionParameter(classLevel=6, qdt=2016-04-19, subject=english)
    - 1 GetLog(classLevel=6, qdt=2016-04-19, subject=english)
* 12 were left pending, among these:
    * 12 were left pending because of unknown reason:
        - 5 EstimateQuestionParameter(classLevel=1...5, qdt=2016-04-19, subject=english)
        - 5 GetLog(pool=None, classLevel=1...5, qdt=2016-04-19, subject=english)
        - 1 UpdateQuestionParameter(qdt=2016-04-19, lastQdt=2016-03-23, subject=english, isInit=False)
        - 1 UpdateQuestionParameterBuffer(qdt=2016-04-19, subject=english, src_table=edw.edw_behavior_question_record_exam_new)

This progress looks :) because there were no failed tasks or missing external dependencies

最佳答案

我认为发生这种情况是因为您的工作人员与调度程序断开了连接。由于网络分区或者更可能的原因,由于此issue,它们的心跳无法发送,因此工作人员的心跳无法到达调度程序。

您可以通过两种方法来解决此问题:

  • 增加worker-disconnect-delay设置(配置中的[scheduler]部分,默认为60s)
  • 为您的工作使用多个 worker ,例如--workers 2(如果是后面的原因)
  • 关于luigi - 路易吉无法完成require方法中列出的所有任务,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36761588/

    10-14 18:24
    查看更多