fix: increase fallback detection threshold from 180s to 300s

Pipeline with 3 articles + GPT-5 Image generation legitimately takes
3-4 minutes. The 180-second fallback was triggering before the pipeline
finished, incorrectly reporting "no content" when it was still running.
Increase to 300 seconds to give the pipeline room to complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-18 14:23:29 +07:00
parent 12654b3a45
commit abcc454dfe

View File

@@ -232,8 +232,10 @@ class PRAutoBlogger_Executor {
return;
}
// After 3 minutes, check if pipeline produced output despite the kill.
if ( $elapsed > 180 ) {
// After 5 minutes, check if pipeline produced output despite the kill.
// Pipeline with 3 articles + images legitimately takes 3–4 minutes,
// so we wait 5 minutes before declaring it orphaned.
if ( $elapsed > 300 ) {
$recent = get_posts( [
'post_type' => 'post',
'post_status' => [ 'publish', 'draft' ],