Changeset 1437

Show
Ignore:
Timestamp:
04/03/08 10:30:23 (5 months ago)
Author:
dbryson
Message:

bee work

Files:

Legend:

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

    r1370 r1437  
    6969    count = 0 
    7070 
    71     bee_work = [] 
     71    bee_work = {"client_id" => cid, "urls" => []} 
    7272 
    7373    # Insert all visited and timed out URLs into the 
     
    8383          "client_id" => cid, 
    8484        } 
     85         
    8586        # Prevent duplication of history items due to  
    8687        # possible flawed logic on (RPC) client side. 
    87         if not HistoryUrl.exists?(url_obj) 
     88        if not HistoryUrl.exists?(url_obj)  
     89          bee_work["urls"] << url_obj 
     90           
    8891          if insert(HistoryUrl,url_obj) 
    8992            count += 1 
     
    9295        end 
    9396         
    94         bee_work << url_obj 
     97        
    9598      end 
    9699    end 
     
    117120    c_time = obj_hash.delete("time_at") 
    118121    Client.update(obj_hash["client_id"],{:compromise => string_to_microseconds(c_time),:status => "suspicious"}) 
    119     insert(Fingerprint,obj_hash) 
    120122     
    121123    # Stores data for Job 
    122124    BeeJob.add_job("fingerprint",obj_hash) 
     125     
     126    insert(Fingerprint,obj_hash) 
    123127  end 
    124128 
    125129  def insert_client(obj_str) 
    126130    obj_hash = YAML.load(obj_str) 
     131     
     132    # This needs to be BEFORE the insert 
     133    BeeJob.add_job("client",obj_hash) 
     134     
    127135    insert(Client,obj_hash) 
    128      
    129     # Stores data for Job 
    130     BeeJob.add_job("client",obj_hash) 
    131136  end 
    132137