use Fluidbook\Tools\SVG\SVGTools;
use Illuminate\Cache\Lock;
use Illuminate\Console\Command;
+use Illuminate\Support\Facades\Log;
use SplFileInfo;
class Compiler extends Base implements CompilerInterface, IVirtualDirectoryErrorListener
public function handle()
{
$this->lock = \Illuminate\Support\Facades\Cache::lock('fluidbook_compile_' . $this->book_id, 1800);
- if ($this->lock->get()) {
+
+ if ($this->lock->block(1800)) {
try {
if (!$this->compositionCached()) {
$this->log('Preprocess images');
$this->lock?->release();
}
+ } else {
+ Log::debug('Failed to get lock for fluidbook #' . $this->book_id . ' compilation');
}
}