mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-03 15:26:16 +02:00
fix(OSM): error handling
This commit is contained in:
parent
34af195ca7
commit
3340d13eed
|
|
@ -341,6 +341,7 @@ export class DockerService {
|
||||||
});
|
});
|
||||||
|
|
||||||
this._broadcast(DockerService.OPENSTREETMAP_IMPORT_SERVICE_NAME, 'importing', `Processing initial import of OSM data. This may take some time...`);
|
this._broadcast(DockerService.OPENSTREETMAP_IMPORT_SERVICE_NAME, 'importing', `Processing initial import of OSM data. This may take some time...`);
|
||||||
|
await disk.put(LOG_PATH, 'Beginning OpenStreetMap data import...\n');
|
||||||
|
|
||||||
const container = await this.docker.createContainer({
|
const container = await this.docker.createContainer({
|
||||||
Image: image,
|
Image: image,
|
||||||
|
|
@ -364,6 +365,10 @@ export class DockerService {
|
||||||
const data = await container.wait();
|
const data = await container.wait();
|
||||||
logger.debug(`OpenStreetMap data import result: ${JSON.stringify(data)}`);
|
logger.debug(`OpenStreetMap data import result: ${JSON.stringify(data)}`);
|
||||||
|
|
||||||
|
if (data.StatusCode !== 0) {
|
||||||
|
throw new Error(`OpenStreetMap data import failed with status code ${data.StatusCode}. Check the log file at ${LOG_PATH} for details.`);
|
||||||
|
}
|
||||||
|
|
||||||
await container.remove();
|
await container.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user