• Iustin Pop's avatar
    job queue: fix interrupted job processing · f6424741
    Iustin Pop authored
    If a job with more than one opcodes is being processed, and the master
    daemon crashes between two opcodes, we have the first N opcodes marked
    successful, and the rest marked as queued. This means that the overall
    jbo status is queued, and thus on master daemon restart it will be
    resent for completion.
    However, the RunTask() function in jqueue.py doesn't deal with
    partially-completed jobs. This patch makes it simply skip such opcodes.
    An alternative option would be to not mark partially-completed jobs as
    QUEUED but instead RUNNING, which would result in aborting of the job at
    restart time.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>