同步修改

This commit is contained in:
邓皓元 2019-02-08 08:24:52 +08:00
parent c5ef860a87
commit f8d64129b2
3 changed files with 6 additions and 18 deletions

View File

@ -36,17 +36,13 @@ class MongoSync extends Command
Artisan::call('real:sync-bloc');
}
$page = 1;
$page = 2;
$jobs = new Collection();
while ($total) {
while ($total && ($page - 1) * $this->limit > $total) {
$jobs->push(new MongoSyncJob($page, $this->limit, $utcDateTime));
if ($page * $this->limit >= $total) {
break;
}
$page++;
}

View File

@ -38,17 +38,13 @@ class CardSync extends Command
Artisan::call('real:sync-bloc');
}
$page = 1;
$page = 2;
$jobs = new Collection();
while ($total) {
while ($total && ($page - 1) * $this->limit > $total) {
$jobs->push(new CardSyncJob($page, $this->limit, $maxId));
if ($page * $this->limit >= $total) {
break;
}
$page++;
}

View File

@ -44,17 +44,13 @@ class LogSync extends Command
Artisan::call('virtual:sync-product');
}
$page = 1;
$page = 2;
$jobs = new Collection();
while ($total) {
while ($total && ($page - 1) * $this->limit > $total) {
$jobs->push(new LogSyncJob($page, $this->limit, $maxId));
if ($page * $this->limit >= $total) {
break;
}
$page++;
}