TCRB und Datenbank umgebaut für Imort Runs
This commit is contained in:
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
||||
* Tabellen:
|
||||
* - sat_satellites
|
||||
* - sat_tle_current
|
||||
* - sat_import_runs
|
||||
* - app_import_runs
|
||||
*/
|
||||
|
||||
ini_set('display_errors', '1');
|
||||
@@ -182,13 +182,15 @@ $recordsUpdated = 0;
|
||||
|
||||
try {
|
||||
$stmtImportStart = $pdo->prepare("
|
||||
INSERT INTO sat_import_runs (
|
||||
INSERT INTO app_import_runs (
|
||||
source,
|
||||
source_url,
|
||||
started_at,
|
||||
status,
|
||||
message
|
||||
) VALUES (
|
||||
:source,
|
||||
:source_url,
|
||||
NOW(),
|
||||
'running',
|
||||
NULL
|
||||
@@ -196,6 +198,7 @@ try {
|
||||
");
|
||||
$stmtImportStart->execute([
|
||||
':source' => $sourceName,
|
||||
':source_url' => $sourceUrl,
|
||||
]);
|
||||
|
||||
$importRunId = (int)$pdo->lastInsertId();
|
||||
@@ -411,7 +414,7 @@ try {
|
||||
$pdo->commit();
|
||||
|
||||
$stmtImportFinish = $pdo->prepare("
|
||||
UPDATE sat_import_runs
|
||||
UPDATE app_import_runs
|
||||
SET
|
||||
finished_at = NOW(),
|
||||
records_received = :records_received,
|
||||
@@ -440,7 +443,7 @@ try {
|
||||
|
||||
if ($importRunId !== null) {
|
||||
$stmtImportError = $pdo->prepare("
|
||||
UPDATE sat_import_runs
|
||||
UPDATE app_import_runs
|
||||
SET
|
||||
finished_at = NOW(),
|
||||
records_received = :records_received,
|
||||
|
||||
Reference in New Issue
Block a user