first working version

This commit is contained in:
forest 2022-12-31 20:03:44 -06:00
parent 4a23f8a26e
commit b1553165c0
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
janitor

View file

@ -1,4 +1,4 @@
{
"DatabaseType": "postgres",
"DatabaseConnectionString": "host=localhost port=5432 user=postgres password=dev database=synapse sslmode=disable"
"DatabaseConnectionString": "host=localhost port=5432 user=synapse_user password=changeme database=synapse sslmode=disable"
}

View file

@ -39,6 +39,7 @@ func main() {
rowCounter += 1
if updateCounter > 10000 {
if time.Now().After(lastUpdateTime.Add(time.Second)) {
lastUpdateTime = time.Now()
percent := int((float64(rowCounter) / float64(stream.EstimatedCount)) * float64(100))
log.Printf("%d/%d (%d%s) ... \n", rowCounter, stream.EstimatedCount, percent, "%")
}