Reduce broken time frame due to missing slugs (#23)

Dates are vanished and re created during import.
Slugs for dates were generate after whole import was finished.
This is now changed to generate slugs for dates after saving each single
event.
This commit is contained in:
Daniel Siepmann 2023-06-15 09:55:15 +02:00 committed by GitHub
parent a756998f1f
commit d9fef5367a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -260,12 +260,11 @@ class DestinationDataImportService
$this->logger->info('Persist database');
$this->eventRepository->update($this->tmpCurrentEvent);
$this->persistenceManager->persistAll();
$this->logger->info('Update slugs');
$this->slugger->update('tx_events_domain_model_event');
$this->slugger->update('tx_events_domain_model_date');
}
$this->logger->info('Update slugs');
$this->slugger->update('tx_events_domain_model_event');
$this->slugger->update('tx_events_domain_model_date');
$this->logger->info('Finished import');
return 0;
}

View file

@ -43,6 +43,13 @@ Fixes
It didn't check if a file that could be deleted because one event got deleted,
was still in use by another event.
* Generate slugs after each single event was imported.
This should prevent a situation where a large amount of events is imported without
having slugs.
Routing might break depending on configuration.
The time range where this can happen is now reduced as slugs for each event and
date is generated right after saving each of them.
Tasks
-----