def kill(self): if self.Data.get('scriptJob') > 0: cmds.scriptJob(k=self.Data['scriptJob']) self.Data['scriptJob'] = -1 Logger.info('kill scriptJob %s' % self.__class__)
def start(self, **sjFlags): kwargs = {self.ScriptFlag: (self.EventType, self)} kwargs.update(sjFlags) self.Data['scriptJob'] = cmds.scriptJob(**kwargs) Logger.info('start scriptJob %s' % self.__class__)