Changeset 1593

Show
Ignore:
Timestamp:
05/27/08 17:37:07 (3 months ago)
Author:
kindlund
Message:

Updated insert_queue_url operations.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/controllers/hc_database_controller.rb

    r1592 r1593  
    1313  def insert(type,obj_hash) 
    1414    obj = type.new_from_hash(obj_hash) 
    15     sleep 15 
    1615    if obj.nil? 
    1716      return 0  
     
    5958        "source_name" => sname 
    6059      } 
    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. 
    6263      while true 
    6364        begin 
    6465          if insert(QueueUrl,url_obj) 
     66            # Counts the number of URLs successfully inserted OR modified. 
    6567            count += 1 
    6668            break