adjust(); } } public function adjust() { Account::query()->cursor()->each(function ($account) { nlog("resetting email quota for {$account->key}"); $email_count = Cache::get($account->key); if($email_count > 0) LightLogs::create(new EmailCount($email_count, $account->key))->batch(); Cache::forget($account->key); Cache::forget("throttle_notified:{$account->key}"); }); } }