1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Jobs\Cron;
- use App\Services\Jobfair\JobfairService;
- 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 BlackCompany implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- const CREATE_LIST = 'create';
- const UPDATE_LIST = 'update';
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct()
- {
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle(JobfairService $jobfairService)
- {
- $res = $jobfairService->getJobfairCompany();
- if (!$res) {
- Log::error('jobfair_blacklists failed to delete.', [
- 'date' => [
- 'type'=>1,
- 'created_at'=>date('Y-m-d H:i:s', strtotime('-90 days')),
- ]
- ]);
- }
- }
- }
|