add semaphore namespace prefix

This commit is contained in:
ghost 2023-11-30 00:51:42 +02:00
parent 880764aa49
commit ee074b684a
2 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,12 @@
<?php
// Prevent multi-thread execution
$semaphore = sem_get(crc32('yo.cli.document.clean'), 1);
$semaphore = sem_get(
crc32(
__DIR__ . '.yo.cli.document.clean'
),
1
);
if (false === sem_acquire($semaphore, true))
{

View File

@ -1,7 +1,12 @@
<?php
// Prevent multi-thread execution
$semaphore = sem_get(crc32('yo.cli.document.crawl'), 1);
$semaphore = sem_get(
crc32(
__DIR__ . '.yo.cli.document.crawl'
),
1
);
if (false === sem_acquire($semaphore, true))
{