Hey @schettino72 ! :)
I have experimenting with parallel task execution using multithread configuration and found one strange (for me) moment.
One of executed tasks have an 'teardown' action, that just cleans temporary folder. I found that this teardown action is executed as much times, as much threads i specify on launch.
import logging
logging.basicConfig( level = logging.DEBUG )
def task_WithTeardown() :
return {
'actions': [
( lambda : True )
],
'teardown': [
( lambda : logging.info( 'Teardown fired!' ) )
]
}
def task_Consumer() :
for i in range( 16 ) :
yield {
'name': 'num-{}'.format( i ),
'actions': [
( lambda : True )
],
'setup': [
'WithTeardown'
]
}
This simulation shows N strings INFO:root:Teardown fired!
for doit -n N -P thread
launch command.
It was not obvious for me. Also i found no info about this moment.
Can i somehow make it to be executed only once per all concurrent launch?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too