Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c23618

Browse files
committed
fix: Fix the issue of request failure due to high frequency of requests to the Notion API. Reduce the number of threads to 1.
notion response err: Conflict occurred while saving
1 parent ca0d2a9 commit 1c23618

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎cmd/sync/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Run(lc *leetcode.Leetcode, isNotion bool) {
2727
}
2828

2929
g, _ := errgroup.WithContext(context.TODO())
30-
nThread := 5
30+
nThread := 1
3131

3232
in := make(chan *notion.Record, 10)
3333
go func() {

‎internal/notion/notion.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func ParseProperty(property notionapi.Property) string {
152152
}
153153

154154
func NewNotion(token string) *Notion {
155-
client := notionapi.NewClient(notionapi.Token(token))
155+
client := notionapi.NewClient(notionapi.Token(token), notionapi.WithRetry(10))
156156
return &Notion{
157157
client: client,
158158
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /