moved event store definition to crawler from relay

This commit is contained in:
pippellia-btc
2025-07-22 14:21:38 +02:00
parent ec5a9a3162
commit cce82de057
6 changed files with 159 additions and 17 deletions

View File

@@ -9,11 +9,12 @@ import (
"sync"
"time"
"github.com/pippellia-btc/nastro/sqlite"
"github.com/vertex-lab/crawler_v2/pkg/config"
"github.com/vertex-lab/crawler_v2/pkg/graph"
"github.com/vertex-lab/crawler_v2/pkg/pipe"
"github.com/vertex-lab/crawler_v2/pkg/redb"
"github.com/vertex-lab/relay/pkg/store"
"github.com/vertex-lab/crawler_v2/pkg/store"
"github.com/nbd-wtf/go-nostr"
"github.com/redis/go-redis/v9"
@@ -41,7 +42,10 @@ func main() {
events := make(chan *nostr.Event, config.EventsCapacity)
pubkeys := make(chan string, config.PubkeysCapacity)
store, err := store.New(config.SQLiteURL)
store, err := store.New(
config.SQLiteURL,
sqlite.WithEventPolicy(pipe.EventTooBig),
)
if err != nil {
panic(err)
}