Skip to content

Commit

Permalink
fix: 要不等两分钟吧
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Jan 29, 2024
1 parent dfbe745 commit 0a9552f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/plugins/publish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ async def handle_pr_close(

# 如果商店更新则触发 registry 更新
if event.payload.pull_request.merged:
# GitHub 的缓存一般 1 分钟左右会刷新
await asyncio.sleep(60)
# GitHub 的缓存一般 2 分钟左右会刷新
await asyncio.sleep(delay=120)
await trigger_registry_update(bot, repo_info, publish_type, issue)
else:
logger.info("拉取请求未合并,跳过触发商店列表更新")
Expand Down
4 changes: 2 additions & 2 deletions tests/publish/process/test_pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def test_process_pull_request(app: App, mocker: MockerFixture) -> None:
any_order=True,
)

mock_sleep.assert_awaited_once_with(60)
mock_sleep.assert_awaited_once_with(120)


async def test_process_pull_request_not_merged(app: App, mocker: MockerFixture) -> None:
Expand Down Expand Up @@ -308,7 +308,7 @@ async def test_process_pull_request_skip_plugin_test(
any_order=True,
)

mock_sleep.assert_awaited_once_with(60)
mock_sleep.assert_awaited_once_with(120)


async def test_not_publish(app: App, mocker: MockerFixture) -> None:
Expand Down

0 comments on commit 0a9552f

Please sign in to comment.