You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @lawnsea, first of all - thanks a lot for SpookyJS.
I'm having an issue when using Spooky on different URLs in parallel. I want to capture a screenshot of urls A, B and C
I set up spooky and listen on the capture.saved casper event. The problem is if I call spooky with url A, then straight away call spooky with url B, and then url C, whenever the first url is finished rendering to a file, I get THREE 'capture.saved' events.. all calling back with the same image of the first url to have finished rendering, even though only ONE url has been captured. Then later on.. I will get TWO more 'capture.saved' events for the remaining urls in whatever order the requests finish. These last events call back with the correct image for the url.
Previously, the constructor did not pass new instances through EventEmitter, so
all Spooky instances shared the same EventEmitter instance state. Instead, use
util.inherits and call EventEmitter when constructing Spooky instances.
Thanks to @tomchentw for figuring this one out.
CloseSpookyJS#51, SpookyJS#60
Hey @lawnsea, first of all - thanks a lot for SpookyJS.
I'm having an issue when using Spooky on different URLs in parallel. I want to capture a screenshot of urls A, B and C
I set up spooky and listen on the
capture.saved
casper event. The problem is if I call spooky with url A, then straight away call spooky with url B, and then url C, whenever the first url is finished rendering to a file, I get THREE 'capture.saved' events.. all calling back with the same image of the first url to have finished rendering, even though only ONE url has been captured. Then later on.. I will get TWO more 'capture.saved' events for the remaining urls in whatever order the requests finish. These last events call back with the correct image for the url.I've put together a simple gist which can be run that demonstrates the issue: https://gist.github.com/cjroebuck/5580502
Hopefully this is something stupid I am doing and there's a simple workaround as its been driving me nuts.. thanks
The text was updated successfully, but these errors were encountered: