From 75471ecd99d1b3583a2c87dd71b56a72358de4f2 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Sun, 30 Jun 2019 20:41:08 +0000 Subject: [PATCH] Reuse FTP connection if possible --- config.php | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/config.php b/config.php index 2982b7e..d419565 100644 --- a/config.php +++ b/config.php @@ -7,7 +7,9 @@ 'ttss_file' => 'vehicles_A.json', 'database' => 'mapping_A.sqlite3', 'result' => 'mapping_A.json', + 'result_vehicles' => 'vehicles_A.html', 'mapper' => 'numToTypeB', + 'prefix' => 'b', ], 'tram' => [ 'gtfsrt' => 'ftp://ztp.krakow.pl/VehiclePositions_T.pb', @@ -16,7 +18,9 @@ 'ttss_file' => 'vehicles_T.json', 'database' => 'mapping_T.sqlite3', 'result' => 'mapping_T.json', + 'result_vehicles' => 'vehicles_T.html', 'mapper' => 'numToTypeT', + 'prefix' => 't', ], 'tram2' => [ 'gtfsrt' => 'ftp://ztp.krakow.pl/VehiclePositions.pb', @@ -25,14 +29,18 @@ 'ttss_file' => 'vehicles_T.json', 'database' => 'mapping_T.sqlite3', 'result' => 'mapping_T.json', + 'result_vehicles' => 'vehicles_T.html', 'mapper' => 'numToTypeT', + 'prefix' => 't', ], ]; foreach($sources as $name => &$source) { - foreach(['gtfsrt_file', 'ttss_file', 'database', 'result'] as $field) { + foreach(['gtfsrt_file', 'ttss_file', 'database', 'result', 'result_vehicles'] as $field) { $source[$field] = __DIR__.'/data/'.$source[$field]; } + $source['result_temp'] = $source['result'].'.tmp'; + $source['result_vehicles_temp'] = $source['result_vehicles'].'.tmp'; } unset($source); -- Gitblit v1.9.1