123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Jobs;
- use Illuminate\Bus\Queueable;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- use Illuminate\Support\Facades\Log;
- class TestJob implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- private $work_no;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct($work_no)
- {
- //
- $this->work_no = $work_no;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- //
- echo "hahaha".$this->work_no;
- Log::info('我来了');
- }
- }
|