mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-17 07:24:21 +01:00
fixed comments and log messages
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
/*
|
||||
This programs assumes syncronization between Redis and the event store, meaning
|
||||
that the graph in Redis reflects these events.
|
||||
If that is not the case, go run /cmd/sync/ to syncronize Redis with the event store.
|
||||
If that is not the case, go run /cmd/sync to syncronize Redis with the event store.
|
||||
*/
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
|
||||
/*
|
||||
This program syncronize the Redis database to the events already stored in the event store.
|
||||
If Redis and the eventstore are already in sync, go run /cmd/crawler/.
|
||||
If Redis and the eventstore are already in sync, go run /cmd/crawl.
|
||||
*/
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -50,17 +50,17 @@ func (c ArbiterConfig) Validate() error {
|
||||
}
|
||||
|
||||
if c.Demotion <= 1 {
|
||||
log.Println("WARN: Arbiter: demotion multiplier is smaller than 1." +
|
||||
log.Println("WARN: Arbiter: demotion multiplier is smaller than 1. " +
|
||||
"This implies it's impossible for an active node to be demoted")
|
||||
}
|
||||
|
||||
if 1+c.Promotion <= c.Demotion {
|
||||
log.Println("WARN: Arbiter: the inequality (1 + promotion) > demotion is not satisfied." +
|
||||
log.Println("WARN: Arbiter: the inequality (1 + promotion) > demotion is not satisfied. " +
|
||||
"This implies there will be cyclical promotions -> demotions -> promotions...")
|
||||
}
|
||||
|
||||
if c.PromotionWait < 24*time.Hour {
|
||||
log.Println("WARN: Arbiter: the promotion wait is less than 24hrs." +
|
||||
log.Println("WARN: Arbiter: the promotion wait is less than 24hrs. " +
|
||||
"This implies a reputable attacker could add to the db several bots in a short period of time")
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user