add counter to audit
This commit is contained in:
parent
f033ba3fde
commit
32b4679eea
2 changed files with 7 additions and 3 deletions
|
@ -14,8 +14,8 @@ add-index:
|
|||
reject:
|
||||
docker compose -f docker-compose.yml exec -it peertube-instance-index-filter peertube-instance-index-filter -command reject -host $(host) -reject-reason $(reason)
|
||||
|
||||
### audit: Audit hosts. Arguments: filter
|
||||
### audit: Audit hosts. Arguments: filter, start (skip instances)
|
||||
.PHONY: audit
|
||||
audit:
|
||||
docker compose -f docker-compose.yml exec -it peertube-instance-index-filter peertube-instance-index-filter -command audit -filter $(filter)
|
||||
docker compose -f docker-compose.yml exec -it peertube-instance-index-filter peertube-instance-index-filter -command audit -filter $(filter) -start $(start)
|
||||
|
||||
|
|
6
main.go
6
main.go
|
@ -165,7 +165,11 @@ func audit(filter string, start int) {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
for _, url := range hosts {
|
||||
for i, url := range hosts {
|
||||
if i % 100 == 0 {
|
||||
fmt.Println(i, "(", i+start, ")")
|
||||
}
|
||||
|
||||
filtered := doAudit(url, filter)
|
||||
if filtered {
|
||||
reject(url, filter)
|
||||
|
|
Loading…
Add table
Reference in a new issue