Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tempdir的做法导致处理并行任务的时候出错 #36

Open
cabbagebai opened this issue Feb 20, 2018 · 1 comment
Open

tempdir的做法导致处理并行任务的时候出错 #36

cabbagebai opened this issue Feb 20, 2018 · 1 comment

Comments

@cabbagebai
Copy link

cabbagebai commented Feb 20, 2018

tempdir='~/.myqr/'会在开始的时候创建,最后删除,如果一台机器上有多个process在使用这个library,就会出现process A刚创建完,还没有生成好图片,process B就把该目录删除了,解决方案可以是把save_name也放到tempdir的目录名字上 或者不用时"~"是在save_dir里面创建临时目录:
tempdir = os.path.join(os.path.expanduser('~'), '.myqr', save_name)
or
tempdir = os.path.join(save_dir, '.myqr', save_name)
你看看是否可以,如果可以就更新一下library,谢谢了

@cabbagebai
Copy link
Author

上面横线不知道为何会出现,不是我故意加的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant