Changeset 1437
- Timestamp:
- 04/03/08 10:30:23 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/controllers/hc_database_controller.rb
r1370 r1437 69 69 count = 0 70 70 71 bee_work = []71 bee_work = {"client_id" => cid, "urls" => []} 72 72 73 73 # Insert all visited and timed out URLs into the … … 83 83 "client_id" => cid, 84 84 } 85 85 86 # Prevent duplication of history items due to 86 87 # 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 88 91 if insert(HistoryUrl,url_obj) 89 92 count += 1 … … 92 95 end 93 96 94 bee_work << url_obj97 95 98 end 96 99 end … … 117 120 c_time = obj_hash.delete("time_at") 118 121 Client.update(obj_hash["client_id"],{:compromise => string_to_microseconds(c_time),:status => "suspicious"}) 119 insert(Fingerprint,obj_hash)120 122 121 123 # Stores data for Job 122 124 BeeJob.add_job("fingerprint",obj_hash) 125 126 insert(Fingerprint,obj_hash) 123 127 end 124 128 125 129 def insert_client(obj_str) 126 130 obj_hash = YAML.load(obj_str) 131 132 # This needs to be BEFORE the insert 133 BeeJob.add_job("client",obj_hash) 134 127 135 insert(Client,obj_hash) 128 129 # Stores data for Job130 BeeJob.add_job("client",obj_hash)131 136 end 132 137
