Closed ubmarco closed 11 months ago
Good catch. I think the .new
file should be created with a random name (by using mkstemp(prefix=outfname, dir=..)
for example.) Since the output content is identical, we won't need locking nor randomness in the final output.
Awesome. Thanks for the quick fix, it works!
When running the Sphinx write phase in parallel on Linux, I'm gettig this
After some investigation I found the source problem:
def render()
functions generates a unique key inkey = hash_plantuml_node(node)
rename(outfname + '.new', outfname)
while the other process is still generatingFileNotFoundError
I see 2 solutions:
os.getpid()
) part of the hashing. That way the diagrams will still be unique when running in serial and when running in parallel, all processes generate own diagrams in case they have the same content.