added e2e tests

This commit is contained in:
pippellia-btc
2025-06-05 16:41:19 +02:00
parent 6cbd20f452
commit 1a9bea8005
13 changed files with 358 additions and 74 deletions

View File

@@ -30,7 +30,6 @@ func (c ProcessorConfig) Print() {
fmt.Printf(" PrintEvery: %d\n", c.PrintEvery)
}
// Processor() process one event at the time from the eventChannel, based on their kind.
func Processor(
ctx context.Context,
config ProcessorConfig,
@@ -44,8 +43,11 @@ func Processor(
cache := walks.NewWalker(
walks.WithCapacity(10000),
walks.WithFallback(db),
walks.WithLogFile("cache.log"),
)
log.Println("Processor: ready to process events")
for {
select {
case <-ctx.Done():
@@ -126,7 +128,7 @@ func processFollowList(cache *walks.CachedWalker, db redb.RedisDB, event *nostr.
return err
}
walksTracker.Add(int32(len(new)))
WalksTracker.Add(int32(len(new)))
return cache.Update(ctx, delta)
}