同步修改
This commit is contained in:
parent
c5ef860a87
commit
f8d64129b2
@ -36,17 +36,13 @@ class MongoSync extends Command
|
|||||||
Artisan::call('real:sync-bloc');
|
Artisan::call('real:sync-bloc');
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = 1;
|
$page = 2;
|
||||||
|
|
||||||
$jobs = new Collection();
|
$jobs = new Collection();
|
||||||
|
|
||||||
while ($total) {
|
while ($total && ($page - 1) * $this->limit > $total) {
|
||||||
$jobs->push(new MongoSyncJob($page, $this->limit, $utcDateTime));
|
$jobs->push(new MongoSyncJob($page, $this->limit, $utcDateTime));
|
||||||
|
|
||||||
if ($page * $this->limit >= $total) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$page++;
|
$page++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,17 +38,13 @@ class CardSync extends Command
|
|||||||
Artisan::call('real:sync-bloc');
|
Artisan::call('real:sync-bloc');
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = 1;
|
$page = 2;
|
||||||
|
|
||||||
$jobs = new Collection();
|
$jobs = new Collection();
|
||||||
|
|
||||||
while ($total) {
|
while ($total && ($page - 1) * $this->limit > $total) {
|
||||||
$jobs->push(new CardSyncJob($page, $this->limit, $maxId));
|
$jobs->push(new CardSyncJob($page, $this->limit, $maxId));
|
||||||
|
|
||||||
if ($page * $this->limit >= $total) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$page++;
|
$page++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,17 +44,13 @@ class LogSync extends Command
|
|||||||
Artisan::call('virtual:sync-product');
|
Artisan::call('virtual:sync-product');
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = 1;
|
$page = 2;
|
||||||
|
|
||||||
$jobs = new Collection();
|
$jobs = new Collection();
|
||||||
|
|
||||||
while ($total) {
|
while ($total && ($page - 1) * $this->limit > $total) {
|
||||||
$jobs->push(new LogSyncJob($page, $this->limit, $maxId));
|
$jobs->push(new LogSyncJob($page, $this->limit, $maxId));
|
||||||
|
|
||||||
if ($page * $this->limit >= $total) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$page++;
|
$page++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user