pabot icon indicating copy to clipboard operation
pabot copied to clipboard

output_file listener method bug using multiple processes

Open bioneyez opened this issue 5 years ago • 5 comments

I've encountered a weird bug using the output_file listener method. It seems like that this listener is executed multiple times. To be more exact the number of processes and the execution of the above mentioned method is equal.

If I understand correctly this listener should be called once when writing to the output.xml file is finished.

OS: Win 10 Python: 3.7.4 Pabot: 0.89

Thanks for your help!

bioneyez avatar Jan 17 '20 14:01 bioneyez

Hi, Pabot uses robot processes for parallelisation. This means that a listener will have a lifecycle that matches a process. The last output is actually written after the processes have finished. Listener unfortunately does not get this info.

mkorpela avatar Jan 17 '20 14:01 mkorpela

I see. Can you suggest some work around? Should I drop the listener implementation and just call the python module after the execution finishes?

bioneyez avatar Jan 17 '20 14:01 bioneyez

For now I think calling the module after is the only option.

mkorpela avatar Jan 19 '20 18:01 mkorpela

Alright thanks for the help. Should I close this issue, or is this considered a bug?

bioneyez avatar Jan 20 '20 08:01 bioneyez

I think this is a bug or a feature request. No need to close it for now. Have to think what to do for it.

mkorpela avatar Jan 20 '20 10:01 mkorpela