-
Notifications
You must be signed in to change notification settings - Fork 3
/
ingest.php
31 lines (17 loc) · 839 Bytes
/
ingest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require_once('vendor/autoload.php');
date_default_timezone_set('America/Denver');
use Symfony\Component\Console\Application;
use ReferralIngester\Command\ReferralIngestCommand;
// Read configs for Ingestion's DB access
$configuration = @include('config/config.php');
if ( !isset( $configuration['referral-ingestion'] ) )
{
throw new \Exception('Malformed or missing configuration. Need referral-ingestion configuration.');
}
$referralIngestCommandDbConfig = $configuration['referral-ingestion']['app-database'];
$druidNodeConnInfo = $configuration['referral-ingestion']['druid-connection'];
$configuredIngestionCommand = new ReferralIngestCommand( $referralIngestCommandDbConfig, $druidNodeConnInfo, 'referral-ingest' );
$console = new Application();
$console->add( $configuredIngestionCommand );
$console->run();