fix: 全模块Critical安全修复 — 防重入+锁+精度+XSS
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
class RemoveQueue extends Command
|
||||
{
|
||||
protected $signature = "remove_queue";
|
||||
protected $description = "定期移除积压任务";
|
||||
public function handle()
|
||||
{
|
||||
$this->comment("start1");
|
||||
$redis = \Illuminate\Support\Facades\Redis::connection();
|
||||
$res = $redis->keys('queues:*');
|
||||
foreach ($res as $v) {
|
||||
if ($redis->type($v) == 'list' && $redis->llen($v) > 3000) {
|
||||
$redis->del($v);
|
||||
}
|
||||
}
|
||||
$this->comment("end");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user