mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-02-07 20:34:28 +00:00
fix snap fs init
This commit is contained in:
parent
6eb45fdad2
commit
79d07dd1a5
@ -669,15 +669,19 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND
|
|||||||
|
|
||||||
$crc32data = crc32($content);
|
$crc32data = crc32($content);
|
||||||
|
|
||||||
// Create not duplicated data snaps only, even newer by time added
|
|
||||||
if (!$db->findHostPageSnap($queueHostPage->hostPageId, $crc32data)) {
|
|
||||||
|
|
||||||
$snapTime = time();
|
$snapTime = time();
|
||||||
$snapPath = chunk_split($queueHostPage->hostPageId, 1, '/');
|
$snapPath = chunk_split($queueHostPage->hostPageId, 1, '/');
|
||||||
|
|
||||||
$snapTmp = __DIR__ . '/../storage/tmp/snap/hp/' . $snapPath . $snapTime . '.zip';
|
$snapTmp = __DIR__ . '/../storage/tmp/snap/hp/' . $snapPath . $snapTime . '.zip';
|
||||||
@mkdir(__DIR__ . '/../storage/tmp/snap/hp/' . $snapPath, 0755, true);
|
@mkdir(__DIR__ . '/../storage/tmp/snap/hp/' . $snapPath, 0755, true);
|
||||||
|
|
||||||
|
// Create not duplicated data snaps only, even newer by time added
|
||||||
|
if ($hostPageSnap = $db->findHostPageSnap($queueHostPage->hostPageId, $crc32data)) {
|
||||||
|
|
||||||
|
$hostPageSnapId = $hostPageSnap->hostPageSnapId;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
// Create new ZIP container
|
// Create new ZIP container
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user