'Returns True if there\'s a currently running iteration of this job.'

def IsRunning(self):

    current_urn = self.Get(self.Schema.CURRENT_FLOW_URN)
    if current_urn:
        try:
            current_flow = aff4.FACTORY.Open(urn=current_urn, aff4_type=flow.GRRFlow, token=self.token, mode='r')
        except aff4.InstantiationError:
            self.DeleteAttribute(self.Schema.CURRENT_FLOW_URN)
            self.Flush()
            return False
        runner = current_flow.GetRunner()
        return (runner.context.state == rdf_flows.FlowContext.State.RUNNING)
    return False
