| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Module\GameItems\Jobs;
- use App\Module\Test\Models\Test;
- use Illuminate\Bus\Queueable;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Queue\SerializesModels;
- /**
- * 测试队列任务类
- *
- * 用于测试和调试目的的队列任务类。
- * 此类主要在开发阶段使用,用于测试队列系统的功能。
- * 不建议在生产环境中使用此队列任务类。
- */
- class TestJob implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- /**
- * 创建任务实例
- *
- * @param Test $test
- */
- public function __construct(protected Test $test)
- {
- }
- /**
- * 执行任务
- *
- * @return void
- */
- public function handle(): void
- {
- // 任务处理逻辑
- }
- }
|