SyncLogCacheTask.php 771 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Log;
  4. use App\Services\LogService;
  5. use Illuminate\Console\Command;
  6. use Illuminate\Support\Facades\Redis;
  7. class SyncLogCacheTask extends Command
  8. {
  9. /**
  10. * The name and signature of the console command.
  11. *
  12. * @var string
  13. */
  14. protected $signature = 'syncLogCacheTask';
  15. /**
  16. * The console command description.
  17. *
  18. * @var string
  19. */
  20. protected $description = 'Command description';
  21. /**
  22. * Create a new command instance.
  23. *
  24. * @return void
  25. */
  26. public function __construct()
  27. {
  28. parent::__construct();
  29. }
  30. /**
  31. * Execute the console command.
  32. *
  33. */
  34. public function handle()
  35. {
  36. LogService::syncRedisLogs();
  37. }
  38. }