Skip to content
45 changes: 45 additions & 0 deletions schemas/vector/metatileQueuePopulator/full/v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/full/v1",
"type": "object",
"title": "metatileQueuePopulatorFullV1",
"description": "Metatile Queue Populator's full schema",
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "https://mapcolonies.com/vector/metatileQueuePopulator/shared/v1"
},
{
"type": "object",
"required": ["db"],
"properties": {
"db": {
"$ref": "https://mapcolonies.com/common/db/full/v2"
}
}
},
{
"$ref": "#/definitions/appSchema"
}
],
"definitions": {
"appSchema": {
"type": "object",
"required": ["app"],
"properties": {
"app": {
"description": "app configuration",
"type": "object",
"default": {},
"properties": {
"projectName": {
"type": "string",
"description": "The name of the project",
"x-env-value": "APP_PROJECT_NAME"
}
},
"required": ["projectName"]
}
}
}
}
}
71 changes: 71 additions & 0 deletions schemas/vector/metatileQueuePopulator/shared/v1.configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
{
"name": "vector-metatilequeuepopulator-shared",
"value": {
"telemetry": {
"shared": {
"serviceName": "metatileQueuePopulator"
},
"tracing": {
"isEnabled": false
},
"logger": {
"level": "info",
"prettyPrint": false
},
"metrics": {
"enabled": true,
"buckets": [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 50, 250, 500]
}
},
"openapiConfig": {
"filePath": "./openapi3.yaml",
"basePath": "/docs",
"rawPath": "/api",
"uiPath": "/api"
},
"server": {
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
}
},
"response": {
"compression": {
"enabled": true,
"options": null
}
}
},
"app": {
"consumeCondition": {
"enabled": true,
"conditionCheckIntervalSec": 60,
"tilesQueueSizeLimit": 400000
},
"enableRequestQueueHandling": true,
"force": {
"api": false,
"expiredTiles": false
},
"metatileSize": 8,
"requestQueueCheckIntervalSec": 30,
"tilesBatchSize": 10000
},
"db": {
"$ref": { "configName": "db-connection", "version": "latest", "schemaId": "https://mapcolonies.com/common/db/partial/v1" },
"ssl": {
"enabled": false
}
},
"queue": {
"expireInSeconds": 600,
"retryBackoff": true,
"retryLimit": 3,
"retryDelaySeconds": 60,
"retentionHours": 87660
}
}
}
]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/v1",
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/shared/v1",
"type": "object",
"title": "metatileQueuePopulatorV1",
"description": "Metatile Queue Populator's schema",
"title": "metatileQueuePopulatorSharedV1",
"description": "Metatile Queue Populator's shared schema",
"allOf": [
{
"$ref": "https://mapcolonies.com/common/boilerplate/v2"
Expand All @@ -19,7 +19,7 @@
"required": ["db"],
"properties": {
"db": {
"$ref": "https://mapcolonies.com/common/db/full/v1"
"$ref": "https://mapcolonies.com/common/db/partial/v1"
}
}
},
Expand All @@ -38,57 +38,55 @@
"app": {
"description": "app configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"projectName": {
"type": "string",
"description": "The name of the project",
"x-env-value": "APP_PROJECT_NAME"
},
"enableRequestQueueHandling": {
"type": "boolean",
"description": "Flag to enable request queue handling",
"x-env-value": "APP_ENABLE_REQUEST_QUEUE_HANDLING",
"default": true
},
"requestQueueCheckIntervalSec": {
"type": "integer",
"type": "number",
"description": "Interval in seconds to check the request queue",
"x-env-value": "APP_REQUEST_QUEUE_CHECK_INTERVAL_SEC",
"default": 30
"default": 30,
"exclusiveMinimum": 0
},
"tilesBatchSize": {
"type": "integer",
"type": "number",
"description": "Size of the tiles batch",
"x-env-value": "APP_TILES_BATCH_SIZE",
"default": 10000
"default": 10000,
"exclusiveMinimum": 0
},
"metatileSize": {
"type": "integer",
"type": "number",
"description": "Size of the metatile",
"x-env-value": "APP_METATILE_SIZE",
"default": 8
"default": 8,
"exclusiveMinimum": 0
},
"consumeDelay": {
"consumeCondition": {
"type": "object",
"description": "Configuration for consume delay",
"properties": {
"enabled": {
"type": "boolean",
"description": "Flag to enable consume delay",
"x-env-value": "APP_CONSUME_DELAY_ENABLED",
"x-env-value": "APP_CONSUME_CONDITION_ENABLED",
"default": false
},
"delaySec": {
"type": "integer",
"conditionCheckIntervalSec": {
"type": "number",
"description": "number of seconds for consume delay",
"x-env-value": "APP_CONSUME_DELAY_SEC"
"x-env-value": "APP_CONSUME_CONDITION_CHECK_INTERVAL_SEC",
"exclusiveMinimum": 0
},
"tilesQueueSizeLimit": {
"type": "number",
"description": "Limit of tiles queue size",
"x-env-value": "APP_CONSUME_DELAY_TILES_QUEUE_SIZE_LIMIT"
"x-env-value": "APP_CONSUME_CONDITION_TILES_QUEUE_SIZE_LIMIT",
"exclusiveMinimum": 0
}
},
"if": {
Expand All @@ -99,7 +97,15 @@
}
},
"then": {
"required": ["delaySec", "tilesQueueSizeLimit"]
"required": ["conditionCheckIntervalSec", "tilesQueueSizeLimit"]
},
"else": {
"allOf": [{ "not": { "required": ["conditionCheckIntervalSec"] } }, { "not": { "required": ["tilesQueueSizeLimit"] } }],
"properties": {
"enabled": {
"const": false
}
}
}
},
"force": {
Expand All @@ -121,15 +127,7 @@
}
}
},
"required": [
"projectName",
"enableRequestQueueHandling",
"requestQueueCheckIntervalSec",
"tilesBatchSize",
"metatileSize",
"consumeDelay",
"force"
]
"required": ["enableRequestQueueHandling", "requestQueueCheckIntervalSec", "tilesBatchSize", "metatileSize", "consumeCondition", "force"]
}
}
},
Expand All @@ -141,13 +139,13 @@
"description": "queue configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"expireInSeconds": {
"type": "integer",
"type": "number",
"description": "Time in seconds before the queue expires",
"x-env-value": "QUEUE_JOBS_EXPIRE_IN_SECONDS",
"default": 600
"default": 600,
"exclusiveMinimum": 0
},
"retryBackoff": {
"type": "boolean",
Expand All @@ -156,22 +154,25 @@
"default": true
},
"retryLimit": {
"type": "integer",
"type": "number",
"description": "Maximum number of retry attempts",
"x-env-value": "QUEUE_JOBS_RETRY_LIMIT",
"default": 3
"default": 3,
"exclusiveMinimum": 0
},
"retryDelaySeconds": {
"type": "integer",
"type": "number",
"description": "Delay in seconds between retry attempts",
"x-env-value": "QUEUE_JOBS_RETRY_DELAY_SECONDS",
"default": 60
"default": 60,
"exclusiveMinimum": 0
},
"retentionHours": {
"type": "integer",
"type": "number",
"description": "Time in hours to retain the queue",
"x-env-value": "QUEUE_JOBS_RETENTION_HOURS",
"default": 87660
"default": 87660,
"exclusiveMinimum": 0
}
},
"required": ["expireInSeconds", "retryBackoff", "retryLimit", "retryDelaySeconds", "retentionHours"]
Expand All @@ -186,7 +187,6 @@
"description": "metrics configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down