MountainDash / nonebot-bison

A nonebot2 plugin to repost social media posts to QQ group
https://nonebot-bison.netlify.app
MIT License
160 stars 33 forks source link

Bilibili调度新增回避策略 #573

Closed AzideCupric closed 1 month ago

AzideCupric commented 2 months ago

原先的30s对叔叔而言还是太敏感了

netlify[bot] commented 2 months ago

Deploy Preview for nonebot-bison ready!

Name Link
Latest commit 38dd0d4d0d6de6378d8f2caedf410152a2b13b96
Latest deploy log https://app.netlify.com/sites/nonebot-bison/deploys/66ab051dfcdedf0008c360a1
Deploy Preview https://deploy-preview-573--nonebot-bison.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 94.53125% with 14 lines in your changes missing coverage. Please review.

Project coverage is 85.39%. Comparing base (af470f2) to head (38dd0d4). Report is 3 commits behind head on main.

Files Patch % Lines
nonebot_bison/platform/bilibili/retry.py 94.20% 8 Missing :warning:
nonebot_bison/platform/bilibili/fsm.py 95.41% 5 Missing :warning:
nonebot_bison/platform/bilibili/scheduler.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #573 +/- ## ========================================== + Coverage 85.01% 85.39% +0.38% ========================================== Files 88 90 +2 Lines 4491 4718 +227 ========================================== + Hits 3818 4029 +211 - Misses 673 689 +16 ``` | [Flag](https://app.codecov.io/gh/MountainDash/nonebot-bison/pull/573/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MountainDash) | Coverage Δ | | |---|---|---| | [smoke-test](https://app.codecov.io/gh/MountainDash/nonebot-bison/pull/573/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MountainDash) | `85.39% <94.53%> (+0.38%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MountainDash#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AzideCupric commented 2 months ago

设想的状态转换图

stateDiagram-v2
    direction LR
    [*] --> NORMAL
    NORMAL --> NORMAL: 请求成功
    NORMAL --> REFRESH: 请求失败
    REFRESH --> NORMAL: 请求成功
    REFRESH --> REFRESH: 请求失败
    REFRESH --> BACKOFF: 请求失败 若重试满但回避未满
    REFRESH --> RAISE: 请求失败 若重试满且回避满
    BACKOFF --> BACKOFF: 回避中
    BACKOFF --> REFRESH: 回避中 若已超时
    RAISE --> RAISE: 请求失败
    RAISE --> NORMAL: 请求成功

修改记录: 检测达到最大BACKOFF次数应在REFRESH状态进行 增加条件控制

AzideCupric commented 2 months ago

用生成器正经搓了个小状态机,感觉这样看起来更清晰一点 cookie pool 这几天测试情况来看没必要加,先删了(留给ospp吧