From 4a3101e616b2dab16b05d518fd3e22e40facbd45 Mon Sep 17 00:00:00 2001 From: Jason Den Dulk Date: Wed, 5 Feb 2025 16:35:42 +1100 Subject: [PATCH] WR #452436: Backport 'hasoverlapped' check. --- classes/web_processor.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/web_processor.php b/classes/web_processor.php index 49ad27b..e372599 100644 --- a/classes/web_processor.php +++ b/classes/web_processor.php @@ -44,6 +44,8 @@ class web_processor implements processor { protected $partialsave; /** @var bool */ protected static $isinsideprocess = false; + /** @var bool */ + protected $hasoverlapped = false; /** * Construct the web processor. @@ -80,7 +82,9 @@ public function init(manager $manager) { if ($this->partialsave) { $manager->get_timer()->setCallback(function () use ($manager) { - $this->process($manager, false); + if (!$this->hasoverlapped) { + $this->process($manager, false); + } }); } @@ -116,6 +120,7 @@ public function process(manager $manager, bool $isfinal) { // We want to prevent doubling up of processing, so skip if an existing process is still executing. // The profile logs will be kept and processed the next time. if (self::$isinsideprocess) { + $this->hasoverlapped = true; debugging('tool_excimer: starting web_processor::process when previous process has not yet finished'); return; }