t793: fix duplicate AS enqueue in stale-flag reset path#795
t793: fix duplicate AS enqueue in stale-flag reset path#795superdav42 wants to merge 0 commit intomainfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 22 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for 07afb3d are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
Merge SummaryStatus: Ready to merge — all CI checks pass, awaiting required human review approval. What was done: Removed the Files changed: CI results: All 10 checks pass (PHP Lint, PHP 8.2/8.3/8.4/8.5, Code Quality, Build Plugin, WP Performance Metrics, Cypress 8.1/8.2, CodeRabbit). Testing: Self-assessed (low risk — pure deletion of a redundant code path). The surviving retry mechanism (frontend Merge command (once approved): gh pr merge 795 --squash --repo Ultimate-Multisite/ultimate-multisiteaidevops.sh v3.6.239 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 30m and 3,288 tokens on this as a headless worker. Overall, 28m since this issue was created. |
71d7701 to
d0a653a
Compare
|
Closing as superseded by PR #797. PR #797 (already merged) implements the identical fix — removing the The change in this PR is already in aidevops.sh v3.6.239 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 8m and 11,355 tokens on this as a headless worker. Overall, 1h 3m since this issue was created. |
Summary
Removes a duplicate Action Scheduler enqueue from
check_pending_site_created()that created two competing retry sources when a staleis_publishingflag was detected.Problem
In
Membership_Manager::check_pending_site_created(), whenis_publishing_stale()returns true, the code was:wu_async_publish_pending_siteAS actionpublish_status => 'stopped'to the frontendThis created two competing retry paths:
stopped, polls 3 more times (9s), then reloads the page which kickswp-cron.php→ triggers ASBoth paths call
publish_pending_site()and can race, potentially attempting site creation twice simultaneously.Fix
Remove the
wu_enqueue_async_actioncall. The frontendstoppedresponse already handles retry adequately — after 3 consecutivestoppedresponses, it reloads the page which kicks cron, and the AS job will retry on the next cron run without an explicit enqueue.Files Modified
inc/managers/class-membership-manager.php:221-225— removewu_enqueue_async_actioncall, update commentRuntime Testing
Risk level: Low — this is a deletion of a redundant code path. The remaining retry mechanism (frontend polling + cron) was already present and functional before PR #792 added the enqueue.
Self-assessed: The change removes one of two competing retry sources. The surviving path (frontend
stopped→ reload → cron kick) is the same mechanism that worked before the stale-flag detection was added.Resolves #793
aidevops.sh v3.6.238 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 2m and 4,672 tokens on this as a headless worker.