Update SendUpdateActor command

This commit is contained in:
Daniel Supernault 2022-11-17 19:43:01 -07:00
parent 04a498af9c
commit 5ce158a272
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -80,7 +80,8 @@ class SendUpdateActor extends Command
$bar->start();
$startCache = $this->getStorageCache($domain);
User::whereNull('status')->when($startCache, function($query, $startCache) {
User::whereNull('status')->when($startCache, function($query, $startCache) use($bar) {
$bar->advance($startCache);
return $query->where('id', '>', $startCache);
})->chunk(50, function($users) use($bar, $url, $domain) {
foreach($users as $user) {