This commit is contained in:
邓皓元 2019-01-16 11:43:09 +08:00
parent f4ea4fd472
commit 8a7e0fb349
2 changed files with 4 additions and 9 deletions

View File

@ -53,11 +53,8 @@ class CardSync extends Command
$jobs->push((new CardSyncJob($page, $this->limit, $maxId))->onQueue('sync'));
}
app(ConfigService::class)->set(self::CURSOR_KEY, $nextId);
$nextId && app(ConfigService::class)->set(self::CURSOR_KEY, $nextId);
if ($total) {
CardSyncJob::onQueue('sync')->withChain($jobs->toArray())->dispatch(1, $this->limit, $maxId);
}
$total && CardSyncJob::onQueue('sync')->withChain($jobs->toArray())->dispatch(1, $this->limit, $maxId);
}
}

View File

@ -59,10 +59,8 @@ class LogSync extends Command
$jobs->push((new LogSyncJob($page, $this->limit, $maxId))->onQueue('sync'));
}
app(ConfigService::class)->set(self::CURSOR_KEY, $nextId);
$nextId && app(ConfigService::class)->set(self::CURSOR_KEY, $nextId);
if ($total) {
LogSyncJob::onQueue('sync')->withChain($jobs->toArray())->dispatch(1, $this->limit, $maxId);
}
$total && LogSyncJob::onQueue('sync')->withChain($jobs->toArray())->dispatch(1, $this->limit, $maxId);
}
}