代码优化
This commit is contained in:
@@ -37,14 +37,7 @@ class SwitchFriendsCommand extends Command
|
||||
$output->writeln('开始执行好友切换任务...');
|
||||
|
||||
do {
|
||||
//$friends = Cache::get($cacheKey, []);
|
||||
|
||||
$friends = [
|
||||
['time' => 1111,'accountId' => 6222,'friendId' => 21075650],
|
||||
['time' => 1111,'accountId' => 6222,'friendId' => 20112769],
|
||||
];
|
||||
|
||||
|
||||
$friends = Cache::get($cacheKey, []);
|
||||
$toSwitch = [];
|
||||
foreach ($friends as $friend) {
|
||||
if (isset($friend['time']) && $friend['time'] < $now) {
|
||||
|
||||
Reference in New Issue
Block a user