Skip to content

Commit

Permalink
switch over to now-merged atproto/identity/redisdir (#507)
Browse files Browse the repository at this point in the history
This is just a copy of `automod/directory`, in a new package location,
and will be maintained/used by other services in addition to just
automod.

There was one very small tweak of the API which is to pass an int for
size of local (in-process) caching (this was hard-coded as 10k
previously).
  • Loading branch information
bnewbold committed Dec 28, 2023
2 parents 0590ced + cd4c97e commit 05273c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 358 deletions.
356 changes: 0 additions & 356 deletions automod/directory/redis_directory.go

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/hepa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"time"

"github.com/bluesky-social/indigo/atproto/identity"
"github.com/bluesky-social/indigo/atproto/identity/redisdir"
"github.com/bluesky-social/indigo/atproto/syntax"
"github.com/bluesky-social/indigo/automod/capture"
"github.com/bluesky-social/indigo/automod/directory"

"github.com/carlmjohnson/versioninfo"
_ "github.com/joho/godotenv/autoload"
Expand Down Expand Up @@ -117,7 +117,7 @@ func configDirectory(cctx *cli.Context) (identity.Directory, error) {
}
var dir identity.Directory
if cctx.String("redis-url") != "" {
rdir, err := directory.NewRedisDirectory(&baseDir, cctx.String("redis-url"), time.Hour*24, time.Minute*2)
rdir, err := redisdir.NewRedisDirectory(&baseDir, cctx.String("redis-url"), time.Hour*24, time.Minute*2, 10_000)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 05273c6

Please sign in to comment.