Skip to content

Commit 2cfcbe3

Browse files
committed
change namespace
1 parent 0b6c08f commit 2cfcbe3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "hiraku/packagist-crawler",
2+
"name": "hirak/packagist-crawler",
33
"description": "build mirror of packagist.org",
44
"license": "CC0-1.0",
55
"authors": [

parallel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ function downloadPackages($config, $globals, $providers)
124124
if (!$list || empty($list->providers)) continue;
125125

126126
$list = $list->providers;
127+
$all = count((array)$list);
127128

129+
$sum = 0;
128130
foreach ($list as $packageName => $provider) {
131+
++$sum;
129132
$url = "$config->packagistUrl/p/$packageName\$$provider->sha256.json";
130133
$cachefile = $cachedir . str_replace("$config->packagistUrl/", '', $url);
131134
if (file_exists($cachefile)) continue;
@@ -142,6 +145,7 @@ function downloadPackages($config, $globals, $providers)
142145
do {
143146
$requests = $globals->mh->getFinishedResponses(); //block
144147
} while (0 === count($requests));
148+
//error_log("downloaded: $sum / $all");
145149

146150
foreach ($requests as $req) {
147151
$res = $req->getResponse();
@@ -239,7 +243,7 @@ function checkFiles($config)
239243
}
240244
}
241245

242-
error_log('' . $i . ' / ' . ($i + $j));
246+
error_log($i . ' / ' . ($i + $j));
243247
return $i;
244248
}
245249

0 commit comments

Comments
 (0)