{"issue":{"title":"runners & colliding databases","user":{"login":"avramd","id":119158,"url":"https://api.github.com/users/avramd","avatar_url":"https://secure.gravatar.com/avatar/e259d61280237b58d0be6a78eafbace1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e259d61280237b58d0be6a78eafbace1"},"created_at":"2011-12-26T06:09:57Z","milestone":null,"labels":[],"state":"open","updated_at":"2011-12-27T18:41:51Z","id":2656967,"closed_at":null,"html_url":"https://github.com/ngauthier/hydra/issues/55","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Hello,\r\n\r\nI'm having trouble with Hydra hanging part way through a run. Sometimes gets as far as 20 specs, sometimes as few as 2. Then it just sits there, with no advancement after 10x as long as all my specs take to run serially.\r\n\r\nI am only running locally (one worker), and things run fine when I specify only one runner. This is a rails app, and many specs use the same models as one another, so my best guess is that my database is getting frotzed by simultaneous access to the same objects. Sound like a good theory? After things go south, even running only 1 worker fails until I blow away my db and start from scratch.\r\n\r\nI went through closed tickets, and found https://github.com/ngauthier/hydra/issues/43. This is a question about separate db's per runner, and the answer is \"yes, but you have to do it yourself\" - however the answer points to an init file for workers, not for runners. So...\r\n\r\nHow would you use a worker init file to get separate DB's per runner?\r\n\r\nAlso, would it be hard to port the worker init file feature to 0.20.0? If I'm seeing things correctly, it's not in there. Sadly we're on RSpec 1.x and Rails 2.x.\r\n\r\nThanks!","number":55,"url":"https://api.github.com/repos/ngauthier/hydra/issues/55","comments":5,"assignee":null},"comment":{"user":{"login":"avramd","id":119158,"url":"https://api.github.com/users/avramd","avatar_url":"https://secure.gravatar.com/avatar/e259d61280237b58d0be6a78eafbace1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e259d61280237b58d0be6a78eafbace1"},"created_at":"2011-12-27T18:41:51Z","updated_at":"2011-12-27T18:41:51Z","id":3284022,"body":"Ummm yeah... now that you say it, it's pretty obvious ;-)\r\n\r\nDo you happen to have an example of a worker init file specifying a different database? I am not yet able to visualize how it fits into the process, and therefore what mechanism it would use to do this. I'm still going through the code but I figured I'd ask in case you had a half-way relevant example floating around.\r\n\r\nThanks for your help,\r\nAvram\r\n\r\nOn  27 Dec 11 , at 1:21 PM, Nick Gauthier wrote:\r\n\r\n> So, if you're interested in backporting the worker-init to a previous version, the way to make that work locally is instead of:\r\n> \r\n> 1 worker => 4 runners\r\n> 4 workers => 1 runner (each)\r\n> \r\n> and make all the workers local. Then they each run the worker-init. In the worker init you need to connect to a different db.\r\n> \r\n> Good luck!","url":"https://api.github.com/repos/ngauthier/hydra/issues/comments/3284022"},"action":"created"}