/** * Execute the console command. * * @return mixed */ public function handle() { $ques = FVSyncQue::where('updated_at', '<=', Carbon::now()->subHours(self::SUBHOURS))->whereIn('status_code', [FVSyncQue::STATUS_INIT, FVSyncQue::STATUS_WRITING, FVSyncQue::STATUS_IMPORTING])->get(); return 0 === $ques->count() ? NULL : $this->notify($ques); }
public function hasProcessingQue() { $num = FVSyncQue::where('type_id', '=', FVSyncType::where('name', '=', $this->getType())->first()->id)->whereIn('status_code', [FVSyncQue::STATUS_WRITING, FVSyncQue::STATUS_IMPORTING])->count(); return 0 < $num; }