Changeset 1593
- Timestamp:
- 05/27/08 17:37:07 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/controllers/hc_database_controller.rb
r1592 r1593 13 13 def insert(type,obj_hash) 14 14 obj = type.new_from_hash(obj_hash) 15 sleep 1516 15 if obj.nil? 17 16 return 0 … … 59 58 "source_name" => sname 60 59 } 61 # Counts the number of urls successfully inserted OR modified 60 # There's a small chance that another process instance may have 61 # simultaneously inserted the same URL into our queue. In that 62 # case, we simply retry the insert operation until it succeeds. 62 63 while true 63 64 begin 64 65 if insert(QueueUrl,url_obj) 66 # Counts the number of URLs successfully inserted OR modified. 65 67 count += 1 66 68 break
