Skip to content

DEVSUPP-160: Added import run entity to track import run success. Cha…#13

Merged
tuj merged 4 commits intodevelopfrom
feature/devsupp-160
Jan 21, 2020
Merged

DEVSUPP-160: Added import run entity to track import run success. Cha…#13
tuj merged 4 commits intodevelopfrom
feature/devsupp-160

Conversation

@tuj
Copy link
Copy Markdown
Contributor

@tuj tuj commented Jan 17, 2020

  • Added import run entity to track import run success.
  • Changed report fields that are imported after change in Anmeldelsesportalen

https://jira.itkdev.dk/browse/DEVSUPP-160

…nged report fields that are imported after change in Anmeldelsesportalen
@tuj tuj requested a review from rimi-itk January 17, 2020 09:54
Copy link
Copy Markdown
Contributor

@rimi-itk rimi-itk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a single comment.

Comment on lines +40 to +55
try {
$this->systemImporter->import($input->getArgument('src'));
} catch (\Exception $e) {
$success = false;
$errorMessage = $e->getMessage();
$output->writeln($errorMessage);
}

$importRun = new ImportRun();
$importRun->setDatetime(new \DateTime());
$importRun->setOutput($success ? 'OK' : $errorMessage);
$importRun->setResult($success);
$importRun->setType(System::class);

$this->entityManager->persist($importRun);
$this->entityManager->flush();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add an ImportInterface and a AbstractImportCommand to prevent duplicating this code …

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. It will be done.

@tuj tuj requested a review from rimi-itk January 17, 2020 10:51
@tuj tuj merged commit b35e710 into develop Jan 21, 2020
@tuj tuj deleted the feature/devsupp-160 branch January 21, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants