mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-17 15:34:26 +01:00
added e2e tests
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user