search for: doercontroller

Displaying 1 result from an estimated 1 matches for "doercontroller".

Did you mean: devcontroller
2008 Apr 18
2
synchronize mongrel cluster
...king about different processes. I looked into using optimistic and pessimistic locking. I don''t like using optimistic locking, because handling the conflict in my case is a real pain. I tried using pessimistic locking, and I can''t get it to work. This is my controller code: class DoerController < ApplicationController def do Locker.transaction do r = Locker.find(1, :lock => true) sleep 10 r.save! end redirect_to :action => :index end end If I start the do action at the same time on ports 8000, 8001 and 8002 (corresponding to my 3 mongrel servers...