Skip to content

Commit

Permalink
Enhance token command output to include active status and clean up ca…
Browse files Browse the repository at this point in the history
…che configuration comments
  • Loading branch information
LittleJake committed Feb 15, 2025
1 parent 6d35aa8 commit 3fe7951
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion application/command/token.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ protected function execute(Input $input, Output $output)
break;
case "list":
foreach ($node_token as $key => $value)
$output->writeln("$key: $value");
$node_active = Cache::store('redis')->ttl("system_monitor:info:$key") > 0;
$output->writeln("$key: $value\nActive: ".($node_active?"Yes":"No"));
exit(0);
case "help":
$output->writeln("Node UUID token manager");
Expand Down
6 changes: 0 additions & 6 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
'type' => 'complex',
'default' => [
'type' => 'file',
// 全局缓存有效期(0为永久有效)
'expire'=> 240,
// 缓存前缀
'prefix'=> 'monitor',
// 缓存目录
'path' => __DIR__.'/../runtime/cache/',
],
'redis' => [
Expand All @@ -39,11 +36,8 @@
],
'flag' => [
'type' => 'file',
// 全局缓存有效期(0为永久有效)
'expire'=> 24*60*60,
// 缓存前缀
'prefix'=> 'flag',
// 缓存目录
'path' => __DIR__.'/../runtime/cache/',
],
'token' => [
Expand Down

0 comments on commit 3fe7951

Please sign in to comment.