From a2e5024066b18231a53845a8c9a4d5d86fd95d31 Mon Sep 17 00:00:00 2001 From: timurhai Date: Tue, 6 Jul 2021 19:54:42 +0300 Subject: [PATCH] PDG: delete afanasy job onStopCook and onStop References #514 --- plugins/houdini/pdg/types/afanasyscheduler.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/houdini/pdg/types/afanasyscheduler.py b/plugins/houdini/pdg/types/afanasyscheduler.py index 84351bbe0..f1b84685d 100644 --- a/plugins/houdini/pdg/types/afanasyscheduler.py +++ b/plugins/houdini/pdg/types/afanasyscheduler.py @@ -53,6 +53,9 @@ def onStart(self): def onStop(self): logger.debug("onStop") self.stopCallbackServer() + if self.job_id is not None: + af.Cmd().deleteJobById(self.job_id) + self.job_id = None return True @@ -95,7 +98,6 @@ def onStartCook(self, static, cook_set): job.blocks.append(block) - self.job_id = 0 try: self.job_id = job.send() self.job_id = self.job_id[1]['id'] @@ -114,6 +116,10 @@ def onStopCook(self, cancel): """ logger.debug("onStopCook") self.stopCallbackServer() + if self.job_id is not None: + af.Cmd().deleteJobById(self.job_id) + self.job_id = None + return True