Skip to content

Commit

Permalink
inc concurrency for writing to the db
Browse files Browse the repository at this point in the history
  • Loading branch information
joshi4 committed May 12, 2024
1 parent 4805e01 commit 2bfcf75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ingest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const tldrPath = "tldr/pages/"

const maxConcurrency = 500
const maxDBConcurrency = 50
const maxDBConcurrency = 75

func main() {
logger := slog.Default()
Expand Down Expand Up @@ -100,7 +100,7 @@ func main() {
if items-lastIndex >= 100 && items != 0 {
// wait a bit to avoid hitting the open ai rate limit
logger.Info("sleeping for two seconds", "cheatsheet", items)
time.Sleep(10 * time.Second)
time.Sleep(5 * time.Second)
lastIndex = items
}

Expand Down

0 comments on commit 2bfcf75

Please sign in to comment.