Closed StagnantIce closed 4 years ago
Please try the latest version!
Thanks, but I already do with multiprocessing.Manager and check that display not exists. Now I have another problem. I created two tasks in celery, each create display. Display is created, but I cant see it in visible mode, and then I use browser in this display, it is obvious use old display.
I mean one worker cant work correctly with two tasks and two displays.
I don't know celery. I need a simple example. You have 2 processes, and each process has 1 display?
Concurrency is fixed in latest version.
From latest README:
"Recent X servers as of version 1.13 (Xvfb, too) support the -displayfd command line option: It will make the X server choose the display itself" https://stackoverflow.com/questions/2520704/find-a-free-x11-display-number/
First help text is checked (e.g. Xvfb -help
) to find if -displayfd
flag is available.
If -displayfd
flag is available then it is used, if not then there are 10 retries by default which should be enough for starting 10 concurrent X servers.
The retries
parameter can be increased if necessary.
Hello, i use PyVirtualDisplay==0.1.5 to take screenshots in celery.
But sometimes new_display_var is dublicate for two workers:
[2016-02-12 04:23:20,879: WARNING/Worker-2] DISPLAY: :1098 [2016-02-12 04:44:08,713: WARNING/Worker-3] DISPLAY: :1098
Please help, thank you.