]> _ Git - fluidbook_tools.git/commitdiff
wip #4947
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Dec 2021 18:46:07 +0000 (19:46 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Dec 2021 18:46:07 +0000 (19:46 +0100)
src/Jobs/ProcessPage.php

index f9df4fda40cbbb992201462e9f15a3689472bc55..7b08fb15aab60b1a0c2112e039fdeb8b9bcb9aab 100644 (file)
@@ -105,6 +105,8 @@ class ProcessPage implements ShouldQueue
         $lock = $this->getPDFInput() . '.split.lock';
         $returnAfterSleep = false;
 
+        usleep(rand(100000, 2000000));
+
         while (file_exists($lock)) {
             $returnAfterSleep = true;
             sleep(5);
@@ -113,8 +115,6 @@ class ProcessPage implements ShouldQueue
             return;
         }
 
-        usleep(rand(100000, 2000000));
-
         start_measure('Split PDF');
         touch($lock);