From ca8bec380ecef80d00ce6daecac2dc17c7e35ccd Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 3 Oct 2022 16:55:50 +0200 Subject: [PATCH] Fix re-enabling recording (#1258) --- src/Watchers/JobWatcher.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Watchers/JobWatcher.php b/src/Watchers/JobWatcher.php index 63a396f73..a4dae1bda 100644 --- a/src/Watchers/JobWatcher.php +++ b/src/Watchers/JobWatcher.php @@ -183,11 +183,15 @@ protected function tags(array $payload) */ protected function updateBatch($payload) { + $wasRecordingEnabled = Telescope::$shouldRecord; + Telescope::$shouldRecord = false; $command = $this->getCommand($payload['data']); - Telescope::$shouldRecord = true; + if ($wasRecordingEnabled) { + Telescope::$shouldRecord = true; + } $properties = ExtractProperties::from( $command