From 01e9a8e40351a87f6548a4f55de842d6f6918ad0 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 15 Sep 2026 02:44:28 +0000
Subject: [PATCH] =Found little glitch with auto-adding rewrite rules to taxonomy Registrar instances where we have the post type as the base in the url rewrite
---
inc/managers/queue/Processor.php | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/inc/managers/queue/Processor.php b/inc/managers/queue/Processor.php
index f54fadd..21e6df4 100644
--- a/inc/managers/queue/Processor.php
+++ b/inc/managers/queue/Processor.php
@@ -1,5 +1,7 @@
<?php
namespace JVBase\managers\queue;
+use Throwable;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -62,7 +64,7 @@
$op->result = $result->result;
$op->completedAt = current_time('mysql');
- } catch (\Throwable $e) {
+ } catch (Throwable $e) {
error_log("[Processor] Exception caught: " . $e->getMessage());
$this->handleFailure($op, $e);
}
@@ -138,7 +140,7 @@
}
}
- } catch (\Throwable $e) {
+ } catch (Throwable $e) {
error_log("[Processor] Chunk {$index} failed: " . $e->getMessage());
// Record failed items from this chunk
@@ -199,7 +201,7 @@
return $chunks;
}
- private function handleFailure(Operation $op, \Throwable $e): void
+ private function handleFailure(Operation $op, Throwable $e): void
{
$hash = md5($e->getMessage());
@@ -218,17 +220,17 @@
$op->errorMessage = $e->getMessage();
- JVB()->error()->log(
- '[Queue]:processOne',
- $e->getMessage(),
- [
- 'operation_id' => $op->id,
- 'type' => $op->type,
- 'user_id' => $op->userId,
- 'retries' => $op->retries,
- ],
- $op->outcome === 'failed_permanent' ? 'critical' : 'warning'
- );
+// JVB()->error()->log(
+// '[Queue]:processOne',
+// $e->getMessage(),
+// [
+// 'operation_id' => $op->id,
+// 'type' => $op->type,
+// 'user_id' => $op->userId,
+// 'retries' => $op->retries,
+// ],
+// $op->outcome === 'failed_permanent' ? 'critical' : 'warning'
+// );
}
private function calculateBackoff(int $attempt): string
@@ -279,7 +281,7 @@
};
}
- private function hasAdequateResources(): bool
+ public function hasAdequateResources(): bool
{
// Stricter thresholds for starting (50% memory, 60s minimum time)
$memoryLimit = $this->getMemoryLimitBytes();
--
Gitblit v1.10.0