Skip to content

Commit

Permalink
PDG: delete afanasy job onStopCook and onStop
Browse files Browse the repository at this point in the history
References #514
  • Loading branch information
timurhai committed Jul 6, 2021
1 parent d916a9e commit a2e5024
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/houdini/pdg/types/afanasyscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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']
Expand All @@ -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


Expand Down

0 comments on commit a2e5024

Please sign in to comment.