/** * CRON -> run every 1 HOUR (?) * get one use created DownloadRequest, divide it by wifi density and add calculated records to wigle download queue * * @throws \Nette\Application\AbortException */ public function renderProcessWigleRequest() { MyUtils::setIni(1200, '256M'); $req = $this->downloadRequest->getEldestDownloadRequest(Service\WigleDownload::ID_SOURCE); if ($req) { $coords = new Coords($req->lat_start, $req->lat_end, $req->lon_start, $req->lon_end); $this->downloadQueue->generateLatLngDownloadArray($coords); $total_count = count($this->downloadQueue->getGeneratedCoords()); $this->downloadQueue->save($req->id); $this->downloadRequest->setProcessed($req, $total_count); } $this->terminate(); }