Skip to content

feat: Enhance proxy clearance management with scheduler and warm-up functionality#456

Merged
chenyme merged 1 commit intomainfrom
fix_flaresolverr
Apr 12, 2026
Merged

feat: Enhance proxy clearance management with scheduler and warm-up functionality#456
chenyme merged 1 commit intomainfrom
fix_flaresolverr

Conversation

@chenyme
Copy link
Copy Markdown
Owner

@chenyme chenyme commented Apr 12, 2026

Summary

  • Add a single-flight guard for proxy clearance refreshes so only one coroutine calls FlareSolverr per affinity key while concurrent requests wait for the same result.
  • Add explicit clearance lifecycle helpers to invalidate and warm up cached bundles, and update the proxy clearance scheduler to prewarm on startup and refresh by invalidating then rebuilding bundles.
  • Start the proxy clearance scheduler during app startup on the leader worker so FlareSolverr-managed clearance stays fresh in the background and the first real request is less likely to block on clearance generation.

Testing

  • uv run python -c 'from app.control.proxy import ProxyDirectory; from app.control.proxy.scheduler import ProxyClearanceScheduler; d = ProxyDirectory(); s = ProxyClearanceScheduler(d); print("proxy scheduler import ok")'
  • uv run python -c 'from app.main import create_app; app = create_app(); print(app.title)'

Related

@chenyme chenyme merged commit 442ce23 into main Apr 12, 2026
4 checks passed
@chenyme chenyme deleted the fix_flaresolverr branch April 12, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Flaresolverr 似乎并不根据面板上设置的时间间隔自动触发刷新

1 participant