diff --git a/cmd/sync/main.go b/cmd/sync/main.go index f2f41bc..9424aa8 100644 --- a/cmd/sync/main.go +++ b/cmd/sync/main.go @@ -27,7 +27,7 @@ func Run(lc *leetcode.Leetcode, isNotion bool) { } g, _ := errgroup.WithContext(context.TODO()) - nThread := 5 + nThread := 1 in := make(chan *notion.Record, 10) go func() { diff --git a/internal/notion/notion.go b/internal/notion/notion.go index 3d1ef2b..f7fccbe 100644 --- a/internal/notion/notion.go +++ b/internal/notion/notion.go @@ -152,7 +152,7 @@ func ParseProperty(property notionapi.Property) string { } func NewNotion(token string) *Notion { - client := notionapi.NewClient(notionapi.Token(token)) + client := notionapi.NewClient(notionapi.Token(token), notionapi.WithRetry(10)) return &Notion{ client: client, }