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