File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ public function handle()
2525 $ userList = User::query ()->where ('status ' , '< ' , 0 )->get ();
2626 if (!$ userList ->isEmpty ()) {
2727 foreach ($ userList as $ user ) {
28- User::query ()->where ('id ' , $ user ->id )->update (['port ' => 0 ]);
28+ if ($ user ->port ) {
29+ User::query ()->where ('id ' , $ user ->id )->update (['port ' => 0 ]);
30+ }
2931 }
3032 }
3133 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ protected function schedule(Schedule $schedule)
5050 $ schedule ->command ('command:autoDisableUserJob ' )->everyMinute ();
5151 $ schedule ->command ('command:autoExpireCouponJob ' )->everyThirtyMinutes ();
5252 $ schedule ->command ('command:autoExpireInviteJob ' )->everyThirtyMinutes ();
53- $ schedule ->command ('command:autoReleasePortJob ' )->daily ();
53+ $ schedule ->command ('command:autoReleasePortJob ' )->everyMinute ();
5454 $ schedule ->command ('command:autoReopenUserJob ' )->everyMinute ();
5555 $ schedule ->command ('command:autoResetUserTrafficJob ' )->everyFiveMinutes ();
5656 $ schedule ->command ('command:autoStatisticsNodeDailyTrafficJob ' )->dailyAt ('04:30 ' );
Original file line number Diff line number Diff line change 1+ -- 去掉user表的唯一索引,解决无法自动释放端口的问题
2+ ALTER TABLE ` user` DROP INDEX ` port` ;
You can’t perform that action at this time.
0 commit comments