commit | author | age
|
ea2e9b
|
1 |
<?php |
JK |
2 |
require_once(__DIR__.'/vendor/autoload.php'); |
f6f791
|
3 |
require_once(__DIR__.'/lib/output.php'); |
ea2e9b
|
4 |
require_once(__DIR__.'/lib/vehicle_types.php'); |
JK |
5 |
require_once(__DIR__.'/config.php'); |
|
6 |
|
|
7 |
foreach($sources as $name => $source) { |
|
8 |
$logger = new Monolog\Logger('regenerate_'.$name); |
|
9 |
try { |
|
10 |
$logger->info('Regenerating '.$name.'...'); |
|
11 |
$db = new Database($source['database']); |
f6f791
|
12 |
createMapping($db, $source['mapper'], $source); |
ea2e9b
|
13 |
$logger->info('Finished'); |
JK |
14 |
} catch(Throwable $e) { |
|
15 |
$logger->error($e->getMessage(), ['exception' => $e, 'exception_string' => (string)$e]); |
|
16 |
} |
|
17 |
} |