mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-17 23:44:27 +01:00
moved event store definition to crawler from relay
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user