aturi indexer with listRecords and countRecords endpoints

only add to ops count if the op was actually handled

ptr.pet 094521b4 69ae82f9

verified
+2 -2
+2 -2
src/main.rs
··· 143 143 let mut handled = true; 144 144 145 145 if let Event::Record(rec) = event { 146 - ops_count.fetch_add(1, Ordering::Relaxed); 147 - 148 146 match db.keyspace(&rec.collection, KeyspaceCreateOptions::default) { 149 147 Ok(ks) => { 150 148 let counts = counts.clone(); 149 + let ops_count = ops_count.clone(); 151 150 handled = 152 151 tokio::task::spawn_blocking(move || { 153 152 if let Err(e) = handle_record(&counts, &ks, rec) { 154 153 error!("error handling record: {}", e); 155 154 false 156 155 } else { 156 + ops_count.fetch_add(1, Ordering::Relaxed); 157 157 true 158 158 } 159 159 })