def on_ok(self, sender):
        """
        This callback is called when one task reaches status `S_OK`.
        It removes the WFKQ file if all its children have reached `S_OK`.
        """
        if self.remove_wfkq:
            for task in self.wfkq_tasks:
                if task.status != task.S_OK: continue
                children = self.wfkq_task_children[task]
                if all(child.status == child.S_OK for child in children):
                   path = task.outdir.has_abiext("WFQ")
                   if path:
                       self.history.info("Removing WFQ: %s" % path)
                       os.remove(path)

        return super().on_ok(sender)
def on_ok ( self , sender ) : if self . remove_wfkq : for task in self . wfkq_tasks : if task . status != task . S_OK : continue children = self . wfkq_task_children [ task ] if all ( child . status == child . S_OK for child in children ) : path = task . outdir . has_abiext ( "WFQ" ) if path : self . history . info ( "Removing WFQ: %s" % path ) os . remove ( path ) return super ( ) . on_ok ( sender )
This callback is called when one task reaches status `S_OK`.
        It removes the WFKQ file if all its children have reached `S_OK`.