mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Create one method per file
This commit is contained in:
22
pipeline/src/biergarten_data_generator/run.cpp
Normal file
22
pipeline/src/biergarten_data_generator/run.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @file biergarten_data_generator/run.cpp
|
||||
* @brief BiergartenDataGenerator::Run() implementation.
|
||||
*/
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "biergarten_data_generator.h"
|
||||
|
||||
auto BiergartenDataGenerator::Run() -> bool {
|
||||
try {
|
||||
const std::unique_ptr<DataGenerator> generator = InitializeGenerator();
|
||||
const std::vector<Location> cities = QueryCitiesWithCountries();
|
||||
const std::vector<EnrichedCity> enriched = EnrichWithWikipedia(cities);
|
||||
this->GenerateBreweries(*generator, enriched);
|
||||
this->LogResults();
|
||||
return true;
|
||||
} catch (const std::exception& e) {
|
||||
spdlog::error("Pipeline execution failed with error: {}", e.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user