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