From df19f92180d62c68791bc390b43b9ba7e1a7dc96 Mon Sep 17 00:00:00 2001 From: Rick Saccoccia Date: Fri, 8 Nov 2024 13:59:42 -0700 Subject: [PATCH] [service] updateConfig inner async methods await before we query --- plugins/arcgis/service/src/FeatureServiceAdmin.ts | 4 ++-- plugins/arcgis/service/src/ObservationProcessor.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/arcgis/service/src/FeatureServiceAdmin.ts b/plugins/arcgis/service/src/FeatureServiceAdmin.ts index 2f3f08ded..d9e8f60a0 100644 --- a/plugins/arcgis/service/src/FeatureServiceAdmin.ts +++ b/plugins/arcgis/service/src/FeatureServiceAdmin.ts @@ -95,7 +95,7 @@ export class FeatureServiceAdmin { } if (addFields.length > 0) { - this.addFields(service, featureLayer, addFields) + await this.addFields(service, featureLayer, addFields) } const eventFieldSet = new Set() @@ -115,7 +115,7 @@ export class FeatureServiceAdmin { if (deleteFields.length > 0) { layerInfo.fields = remainingFields - this.deleteFields(service, featureLayer, deleteFields) + await this.deleteFields(service, featureLayer, deleteFields) } } diff --git a/plugins/arcgis/service/src/ObservationProcessor.ts b/plugins/arcgis/service/src/ObservationProcessor.ts index ccaa54886..b44a3a38b 100644 --- a/plugins/arcgis/service/src/ObservationProcessor.ts +++ b/plugins/arcgis/service/src/ObservationProcessor.ts @@ -169,7 +169,7 @@ export class ObservationProcessor { this._geometryChangeHandler = new GeometryChangedHandler(this._transformer); this._eventDeletionHandler = new EventDeletionHandler(this._console, config); this._layerProcessors = []; - this.getFeatureServiceLayers(config); + await this.getFeatureServiceLayers(config); this._previousConfig = configJson this._firstRun = true; }