Hmm, let me see if you can somehow "signal" to the subprocess that it should not use the main process Task. (btw: are you forking or spawning a subprocess?)
actually, i'm using subprocess.
Popen
and step X is another python script file executed from a single main parent process.
Okay, I'm pretty sure there is a hack, let me see if there is something "nicer"
AgitatedDove14 I tried and it works OK withTask.current_task()
and overall Task.init
.
Sorry for confusion.
TightElk12 are you still looking for a way to create a new "sub-task" ?
Hi TightElk12
One option will be to call task.close() at the end of each step and task.init at the beginning of another.
Will that do?
Let me check that, thanks !
I was also started to think about closing the task and call init. Let me detail again the use-case if it was unclear:parent process |-- Task.init(...) |-- step 1 sub-process | |-- Task.init(...) | |-- task.connect |-- step 2 sub-process | |-- Task.init(...) | |-- task.connect |- end