tangled
alpha
login
or
join now
edavis.dev
/
bsky-tools
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
bsky-modactions: switch to ZSCORE data type
Eric Davis
6 months ago
bcef0c9e
4526fb39
+1
-2
1 changed file
expand all
collapse all
unified
split
cmd
bsky-modactions
main.go
+1
-2
cmd/bsky-modactions/main.go
···
84
84
if label.Src != BskyModDid {
85
85
continue
86
86
}
87
87
-
slog.Info("parsed label", "neg", label.Neg, "uri", label.Uri, "val", label.Val)
88
87
89
88
var neg bool
90
89
if label.Neg != nil {
···
92
91
}
93
92
key := fmt.Sprintf("%s:%t", label.Val, neg)
94
93
95
95
-
if err := rdb.HIncrBy(ctx, ActionsLabels, key, 1).Err(); err != nil {
94
94
+
if err := rdb.ZIncrBy(ctx, ActionsLabels, 1, key).Err(); err != nil {
96
95
slog.Error("error incrementing key", "key", key)
97
96
}
98
97
}