tangled
alpha
login
or
join now
ptr.pet
/
aturlist
0
fork
atom
aturi indexer with listRecords and countRecords endpoints
0
fork
atom
overview
issues
pulls
pipelines
only add to ops count if the op was actually handled
ptr.pet
1 month ago
094521b4
69ae82f9
verified
This commit was signed with the committer's
known signature
.
ptr.pet
SSH Key Fingerprint:
SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw=
+2
-2
1 changed file
expand all
collapse all
unified
split
src
main.rs
+2
-2
src/main.rs
···
143
let mut handled = true;
144
145
if let Event::Record(rec) = event {
146
-
ops_count.fetch_add(1, Ordering::Relaxed);
147
-
148
match db.keyspace(&rec.collection, KeyspaceCreateOptions::default) {
149
Ok(ks) => {
150
let counts = counts.clone();
0
151
handled =
152
tokio::task::spawn_blocking(move || {
153
if let Err(e) = handle_record(&counts, &ks, rec) {
154
error!("error handling record: {}", e);
155
false
156
} else {
0
157
true
158
}
159
})
···
143
let mut handled = true;
144
145
if let Event::Record(rec) = event {
0
0
146
match db.keyspace(&rec.collection, KeyspaceCreateOptions::default) {
147
Ok(ks) => {
148
let counts = counts.clone();
149
+
let ops_count = ops_count.clone();
150
handled =
151
tokio::task::spawn_blocking(move || {
152
if let Err(e) = handle_record(&counts, &ks, rec) {
153
error!("error handling record: {}", e);
154
false
155
} else {
156
+
ops_count.fetch_add(1, Ordering::Relaxed);
157
true
158
}
159
})