Source: PR #4 follow-up review (should address)
Problem
probe_due_queue_depth() (line 621-622) queries wp_actionscheduler_actions without checking if the table exists. On sites using the older posts-based AS data store, or where AS isn't active, this errors on every throttle-enabled request.
It fails safe — run_mysqli_query() returns null and the probe is treated as unavailable — but the error string gets logged into errors.queue_depth on every AS run, making test_observe logs noisy and harder to read.
Fix options
- Cached
SHOW TABLES LIKE guard — check once per request, memoize the result
- Suppress known "table doesn't exist" errors — detect MySQL error 1146 and return null cleanly without populating the error field
- Both — guard + clean error handling
Option 1 is simplest and avoids the query entirely.
Source: PR #4 follow-up review (should address)
Problem
probe_due_queue_depth()(line 621-622) querieswp_actionscheduler_actionswithout checking if the table exists. On sites using the older posts-based AS data store, or where AS isn't active, this errors on every throttle-enabled request.It fails safe —
run_mysqli_query()returns null and the probe is treated as unavailable — but the error string gets logged intoerrors.queue_depthon every AS run, makingtest_observelogs noisy and harder to read.Fix options
SHOW TABLES LIKEguard — check once per request, memoize the resultOption 1 is simplest and avoids the query entirely.