Hey,
is it possible to use pythons multiprocessing module, to start processes next to the main process?
I need to watch a log file to set the progress for a plugin, but it looks like that Deadline ignores my process.
When I run the function itself, it works fine and updates the progress in Deadline. But when I run the function an a process nothing happens (It should print into the log and update the plugin progress).
def SetProgress (Job, progressAmount, currentProgress, arg01, arg02):
# [...]
Job.SetProgress(currentProgress)
Job.SetStatusMessage('Plugin bla blub: %s'%round(currentProgress)+"%")
# [...]
# [...]
# [...]
from multiprocessing import Process
Job = self
p = Process(target=SetProgress , args=(Job, progressAmount, currentProgress, arg01, arg02,) )
p.start()
Logger(" Process: %s"%str(p)) # This log print works fine with the result: "0: PYTHON: Process: <Process(Process-1, started)>"
while not result:
result = self.MainPluginProcess()
# [...]
p.join()
# [...]
SetProgress is a function and not inside the plugin class. I was testing the multiprocess with dummy files and it worked fine.
Would be great if any one could help me with this.
Thanks