TronAnalyze.php 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Servers\EthAnalyzeServer;
  4. use App\Servers\TronAnalyzeServer;
  5. use Illuminate\Console\Command;
  6. class TronAnalyze extends Command
  7. {
  8. /**
  9. * The name and signature of the console command.
  10. *
  11. * @var string
  12. */
  13. protected $signature = 'analyze:tron';
  14. /**
  15. * The console command description.
  16. *
  17. * @var string
  18. */
  19. protected $description = '波场区块分析';
  20. /**
  21. * Create a new command instance.
  22. *
  23. * @return void
  24. */
  25. public function __construct()
  26. {
  27. parent::__construct();
  28. }
  29. /**
  30. * Execute the console command.
  31. *
  32. * @return mixed
  33. */
  34. public function handle()
  35. {
  36. //
  37. $this->info('start------------------');
  38. while (true){
  39. $ret=TronAnalyzeServer::tronAnalyze();
  40. if(empty($ret))sleep(3);
  41. }
  42. $this->info('end------------------');
  43. }
  44. }