Skip to content

Commit

Permalink
automod: quick extraction of redis directory cache.
Browse files Browse the repository at this point in the history
This one will probably move further in the future -- there are already
directory service mocks elsewhere, for example, and so this should most
likely live near those.  That may deserve a larger code review,
however, so for now we just move it into a package as we do with other
things today.
  • Loading branch information
warpfork committed Dec 22, 2023
1 parent 17e13a8 commit 07c4fd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package automod
package directory

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

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

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

0 comments on commit 07c4fd6

Please sign in to comment.