From c4f68fef07be49afa8fb5859e10346f991cdd38a Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Sun, 25 May 2025 20:27:12 +0200 Subject: [PATCH] Fix command --- app/Console/Commands/BlockCommand.php | 30 ++++++++++++--------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/app/Console/Commands/BlockCommand.php b/app/Console/Commands/BlockCommand.php index 8972e1e..ff34288 100644 --- a/app/Console/Commands/BlockCommand.php +++ b/app/Console/Commands/BlockCommand.php @@ -1,28 +1,28 @@ client(); - self::$rpcurl = config('lbry.rpc_url'); - } - /** * Execute the console command. */ public function handle(): void{ + self::$redis = Redis::connection()->client(); + self::$rpcurl = config('lbry.rpc_url'); + $function = $this->argument('function'); if($function){ $this->$function(); @@ -1131,7 +1128,6 @@ class BlockCommand extends Command{ self::lock('parsenewblocks'); echo "Parsing new blocks...\n"; - self::$redis = Redis::connection()->client(); try { // Get the best block hash $req = ['method' => 'getbestblockhash', 'params' => [],'id'=>rand()];