Show More
Commit Description:
[web] frozen in_place_editing...
Commit Description:
[web] frozen in_place_editing git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@135 6386c4cd-e34a-4fa8-8920-d93eb39b512e
File last commit:
Show/Diff file:
Action:
test/concurrent/task_test_get.rb | 16 lines | 310 B | text/x-ruby | RubyLexer |
jittat
add some lock in task...
r30 ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
def take_wait_return
task = Task.get_inqueue_and_change_status(Task::STATUS_GRADING)
sleep (rand)/10.0
task.status_complete
task.save!
end
n = 300
n.times do |i|
take_wait_return
puts i
end