mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-08-26 05:42:05 +00:00
lock multi-thread execution
This commit is contained in:
parent
c9be4d54cc
commit
1485983b3a
@ -1,5 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Lock multi-thread execution
|
||||||
|
$semaphore = sem_get(crc32('crontab.crawler'), 1);
|
||||||
|
|
||||||
|
if (false === sem_acquire($semaphore, true)) {
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// Load system dependencies
|
// Load system dependencies
|
||||||
require_once('../config/app.php');
|
require_once('../config/app.php');
|
||||||
require_once('../library/curl.php');
|
require_once('../library/curl.php');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user