Changeset 1591
- Timestamp:
- 05/27/08 17:23:45 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/controllers/hc_database_controller.rb
r1587 r1591 13 13 def insert(type,obj_hash) 14 14 obj = type.new_from_hash(obj_hash) 15 sleep 15 15 16 if obj.nil? 16 17 return 0 … … 59 60 } 60 61 # Counts the number of urls successfully inserted OR modified 61 if insert(QueueUrl,url_obj) 62 count += 1 62 while true 63 begin 64 if insert(QueueUrl,url_obj) 65 count += 1 66 break 67 end 68 rescue 69 break if $!.to_s.index('Duplicate entry').nil? 70 end 63 71 end 64 72 end
