删除 多余的代码
This commit is contained in:
parent
9b6d0eedfa
commit
4b57077d9f
@ -35,39 +35,9 @@ public function handle()
|
||||
// $this->cache = new Cache();
|
||||
|
||||
// chunk hosts and load user
|
||||
Host::active()->with('user')->chunk(100, function ($hosts) {
|
||||
Host::active()->with('user')->chunk(1000, function ($hosts) {
|
||||
foreach ($hosts as $host) {
|
||||
|
||||
$host->cost();
|
||||
|
||||
// $this->cache_key = 'user_' . $host->user_id;
|
||||
|
||||
// // if cache has user
|
||||
|
||||
// if ($this->cache->has($this->cache_key)) {
|
||||
// // if user is not instances of Model
|
||||
// $user = $this->cache->get($this->cache_key);
|
||||
|
||||
// if ($user instanceof User) {
|
||||
// $this->user = $user;
|
||||
// } else {
|
||||
// $this->user = $this->cache->put($this->cache_key, $host->user, now()->addDay());
|
||||
// }
|
||||
// } else {
|
||||
// $this->user = $this->cache->put($this->cache_key, $host->user, now()->addDay());
|
||||
// }
|
||||
|
||||
// // Log::debug($user);
|
||||
|
||||
// if ($host->managed_price) {
|
||||
// $host->price = $host->managed_price;
|
||||
// }
|
||||
|
||||
|
||||
// $this->user->drops -= $host->price;
|
||||
|
||||
// // update cache
|
||||
// $this->cache->put($this->cache_key, $this->user, now()->addDay());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user