Beispiel #1
0
 /**
  * 下载记录
  * @param unknown_type $nCoolType
  * @return boolean
  */
 public function saveDownload($nCoolType)
 {
     $record = new DownloadRecord();
     $dl = new Download();
     $dl->setRecord();
     // 		Log::write('RecordTask::saveDownload() cpid:'.$dl->cpid.', channer:'.$dl->channel, 'error');
     $result = $record->saveRecord($nCoolType, $dl);
     if (!$result) {
         Log::write('RecordTask::saveDownload():saveRecord() failed', 'log');
         // 			return false;
     }
     // 		$record = new DownloadRecord();
     // 		$dlCount = new DownloadCount();
     // 		$dlCount->setRecord();
     // 		$result = $record->saveCountRecord($nCoolType, $dlCount);
     // 		if(!$result){
     // 			Log::write('RecordTask::saveDownload():saveCountRecord() failed', 'log');
     // 			return false;
     // 		}
     // 		$record->close();
     $queue = new QueueTask();
     $queue->push('dl', $nCoolType, json_encode($dl), 'coolshow_dl_count');
     return true;
 }