This commit is contained in:
邓皓元 2019-02-08 08:57:47 +08:00
parent 80547ccb30
commit df6dce5429
3 changed files with 15 additions and 3 deletions

View File

@ -40,7 +40,11 @@ class MongoSync extends Command
$jobs = new Collection();
while ($total && ($page - 1) * $this->limit > $total) {
while ($total) {
if (($page - 1) * $this->limit >= $total) {
break;
}
$jobs->push(new MongoSyncJob($page, $this->limit, $utcDateTime));
$page++;

View File

@ -42,7 +42,11 @@ class CardSync extends Command
$jobs = new Collection();
while ($total && ($page - 1) * $this->limit > $total) {
while ($total) {
if (($page - 1) * $this->limit >= $total) {
break;
}
$jobs->push(new CardSyncJob($page, $this->limit, $maxId));
$page++;

View File

@ -48,7 +48,11 @@ class LogSync extends Command
$jobs = new Collection();
while ($total && ($page - 1) * $this->limit > $total) {
while ($total) {
if (($page - 1) * $this->limit >= $total) {
break;
}
$jobs->push(new LogSyncJob($page, $this->limit, $maxId));
$page++;