Skip to content

Commit

Permalink
Support jobs without extractors (needed for views)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed Mar 12, 2016
1 parent b1bd6b3 commit b176736
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Runner/ConsoleRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ public function run(Job $job)
$transformers = $job->getTransformers();
$loaders = $job->getLoaders();

$extractor->init();

$count = $extractor->getCount();
$count = 0;
$columns = array();
if ($extractor) {
$extractor->init();
$count = $extractor->getCount();
$columns = $extractor->getColumns();
}
$this->output->writeln('Running job: ' . $job->getName() . ' with ' . $count . ' rows');

$columns = $extractor->getColumns();


foreach ($transformers as $transformer) {
$columnsNew = $transformer->getColumns();
if (!is_null($columnsNew)) {
Expand Down

0 comments on commit b176736

Please sign in to comment.