add counter to audit

This commit is contained in:
Arnas Udovic 2025-06-23 14:10:58 +03:00
parent f033ba3fde
commit 32b4679eea
2 changed files with 7 additions and 3 deletions

View file

@ -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)

View file

@ -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)