2nd try to speed up importer
这个提交包含在:
父节点
6d7df1a2d3
当前提交
412e74f027
共有 2 个文件被更改,包括 19 次插入 和 5 次删除
|
|
@ -195,18 +195,22 @@ class adif extends CI_Controller {
|
||||||
|
|
||||||
$this->adif_parser->initialize();
|
$this->adif_parser->initialize();
|
||||||
$custom_errors = "";
|
$custom_errors = "";
|
||||||
|
$alladif=[];
|
||||||
while($record = $this->adif_parser->get_record())
|
while($record = $this->adif_parser->get_record())
|
||||||
{
|
{
|
||||||
if(count($record) == 0) {
|
if(count($record) == 0) {
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
array_push($alladif,$record);
|
||||||
$one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
// $one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
||||||
if ($one_error != '') {
|
// if ($one_error != '') {
|
||||||
$custom_errors.=$one_error."<br/>";
|
// $custom_errors.=$one_error."<br/>";
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
unlink('./uploads/'.$data['upload_data']['file_name']);
|
unlink('./uploads/'.$data['upload_data']['file_name']);
|
||||||
|
$record='';
|
||||||
|
$data='';
|
||||||
|
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
|
||||||
} else {
|
} else {
|
||||||
$custom_errors='Station Profile not valid for User';
|
$custom_errors='Station Profile not valid for User';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3077,6 +3077,16 @@ function lotw_last_qsl_date($user_id) {
|
||||||
return '1900-01-01 00:00:00.000';
|
return '1900-01-01 00:00:00.000';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function import_bulk($records, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) {
|
||||||
|
$custom_errors='';
|
||||||
|
foreach ($records as $record) {
|
||||||
|
$one_error = $this->logbook_model->import($record, $station_id, $skipDuplicate, $markClublog, $markLotw,$dxccadif, $markQrz, $markHrd, $skipexport, $operatorName, $apicall, $skipStationCheck);
|
||||||
|
if ($one_error != '') {
|
||||||
|
$custom_errors.=$one_error."<br/>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $custom_errors;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* $skipDuplicate - used in ADIF import to skip duplicate checking when importing QSOs
|
* $skipDuplicate - used in ADIF import to skip duplicate checking when importing QSOs
|
||||||
* $markLoTW - used in ADIF import to mark QSOs as exported to LoTW when importing QSOs
|
* $markLoTW - used in ADIF import to mark QSOs as exported to LoTW when importing QSOs
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用