mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-07 15:10:32 +00:00
优化 文章加锁逻辑
This commit is contained in:
@@ -12,9 +12,9 @@ export async function getPostBlocks (id, from, slice, retryCount = 3) {
|
||||
const authToken = BLOG.NOTION_ACCESS_TOKEN || null
|
||||
const api = new NotionAPI({ authToken })
|
||||
try {
|
||||
console.log('[请求API]:', `from:${from}`, `id:${id}`)
|
||||
console.warn('[请求API]:', `from:${from}`, `id:${id}`)
|
||||
pageBlock = await api.getPage(id)
|
||||
console.log('[请求成功]', `from:${from}`, `id:${id}`)
|
||||
console.warn('[请求成功]', `from:${from}`, `id:${id}`)
|
||||
} catch (error) {
|
||||
console.error('[请求失败]', `from:${from}`, `id:${id}`, `error:${error}`)
|
||||
if (retryCount && retryCount > 0) { // 重试
|
||||
|
||||
Reference in New Issue
Block a user