Skip to content

Commit 892b755

Browse files
authored
feat: added detiler (#35)
* feat: added detiler * refactor: detiler error won't cause tile failure * feat: added detiler proceedOnFailure flag * deps: updated detiler packages * feat: added detiler set for process skip * fix: added test interceptor * fix: s3 provider endpoint evaluation * fix: process skip will update state * refactor: detiler determination is according to tile renderedAt * chore(deps): updated detiler packages * fix: changed wms base req service param
1 parent 0b38bab commit 892b755

File tree

26 files changed

+12476
-23931
lines changed

26 files changed

+12476
-23931
lines changed

config/custom-environment-variables.json

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@
2828
"port": "SERVER_PORT"
2929
},
3030
"app": {
31-
"projectName": "APP_PROJECT_NAME",
31+
"project": {
32+
"name": "APP_PROJECT_NAME",
33+
"stateUrl": "APP_PROJECT_STATE_URL"
34+
},
35+
"forceProcess": {
36+
"__name": "APP_FORCE_PROCESS",
37+
"__format": "boolean"
38+
},
3239
"queueName": "QUEUE_NAME",
3340
"parallelism": {
3441
"__name": "APP_JOB_PARALLELISM",
@@ -93,5 +100,46 @@
93100
}
94101
}
95102
}
103+
},
104+
"detiler": {
105+
"enabled": {
106+
"__name": "DETILER_ENABLED",
107+
"__format": "boolean"
108+
},
109+
"proceedOnFailure": {
110+
"enabled": {
111+
"__name": "DETILER_PROCEED_ON_FAILURE",
112+
"__format": "boolean"
113+
}
114+
},
115+
"client": {
116+
"url": "DETILER_CLIENT_URL",
117+
"timeout": {
118+
"__name": "DETILER_CLIENT_TIMEOUT",
119+
"__format": "number"
120+
},
121+
"enableRetryStrategy": {
122+
"__name": "DETILER_CLIENT_ENABLE_RETRY_STRATEGY",
123+
"__format": "boolean"
124+
},
125+
"retryStrategy": {
126+
"retries": {
127+
"__name": "DETILER_CLIENT_RETRY_STRATEGY_RETRIES",
128+
"__format": "number"
129+
},
130+
"shouldResetTimeout": {
131+
"__name": "DETILER_CLIENT_RETRY_STRATEGY_SHOULD_RESET_TIMEOUT",
132+
"__format": "boolean"
133+
},
134+
"isExponential": {
135+
"__name": "DETILER_CLIENT_RETRY_STRATEGY_IS_EXPONENTIAL",
136+
"__format": "boolean"
137+
},
138+
"delay": {
139+
"__name": "DETILER_CLIENT_RETRY_STRATEGY_DELAY",
140+
"__format": "number"
141+
}
142+
}
143+
}
96144
}
97145
}

config/default.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
"port": "8080"
1414
},
1515
"app": {
16-
"projectName": "default",
16+
"project": {
17+
"name": "default",
18+
"stateUrl": "defaultStateUrl"
19+
},
20+
"forceProcess": false,
1721
"queueName": "QUEUE_NAME",
1822
"parallelism": 5,
1923
"jobQueue": {
@@ -64,5 +68,8 @@
6468
"format": "prefix/{z}/{x}/{y}.png",
6569
"shouldFlipY": true
6670
}
71+
},
72+
"detiler": {
73+
"enabled": false
6774
}
6875
}

config/test.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"app": {
33
"parallelism": 2,
44
"queueName": "TEST_QUEUE",
5+
"project": {
6+
"name": "test",
7+
"stateUrl": "http://replication/state.txt"
8+
},
59
"jobQueue": {
610
"waitTimeout": 50,
711
"pgBoss": {
@@ -49,5 +53,12 @@
4953
"shouldFlipY": true
5054
}
5155
}
56+
},
57+
"detiler": {
58+
"enabled": true,
59+
"proceedOnFailure": true,
60+
"client": {
61+
"url": "http://detiler.com"
62+
}
5263
}
5364
}

helm/templates/configmap.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,26 @@ data:
3333
{{- end }}
3434
{{- with .Values.env }}
3535
NO_SUPERVISOR: {{ .jobQueue.pgBoss.noSupervisor | quote }}
36-
APP_PROJECT_NAME: {{ .projectName }}
36+
APP_PROJECT_NAME: {{ .project.name }}
37+
APP_PROJECT_STATE_URL: {{ .project.stateUrl }}
38+
APP_FORCE_PROCESS: {{ .forceProcess }}
39+
DETILER_ENABLED: {{ .detiler.enabled | quote }}
40+
{{- if .detiler.enabled }}
41+
{{- if .detiler.proceedOnFailure }}
42+
DETILER_PROCEED_ON_FAILURE: "true"
43+
{{- else }}
44+
DETILER_PROCEED_ON_FAILURE: "false"
45+
{{- end }}
46+
DETILER_CLIENT_URL: {{ .detiler.client.url | quote }}
47+
DETILER_CLIENT_TIMEOUT: {{ .detiler.client.timeout | quote }}
48+
DETILER_CLIENT_ENABLE_RETRY_STRATEGY: {{ .detiler.client.retryStrategy.enabled | quote }}
49+
{{- if .detiler.client.retryStrategy.enabled }}
50+
DETILER_CLIENT_RETRY_STRATEGY_RETRIES: {{ .detiler.client.retryStrategy.retries | quote }}
51+
DETILER_CLIENT_RETRY_STRATEGY_SHOULD_RESET_TIMEOUT: {{ .detiler.client.retryStrategy.shouldResetTimeout | default false | quote }}
52+
DETILER_CLIENT_RETRY_STRATEGY_IS_EXPONENTIAL: {{ .detiler.client.retryStrategy.isExponential | default false | quote }}
53+
DETILER_CLIENT_RETRY_STRATEGY_DELAY: {{ .detiler.client.retryStrategy.delay | quote }}
54+
{{- end }}
55+
{{- end }}
3756
QUEUE_NAME: {{ .queueName }}
3857
APP_JOB_PARALLELISM: {{ .parallelism | quote }}
3958
QUEUE_WAIT_TIMEOUT: {{ .jobQueue.waitTimeout | quote}}

helm/values.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,18 @@ dbConfig:
3939

4040
env:
4141
logLevel: info
42-
projectName: default
42+
project:
43+
name: default
44+
stateUrl: stateUrl
45+
detiler:
46+
enabled: false
47+
proceedOnFailure: true
48+
client:
49+
url: detilerUrl
50+
timeout: 60000
51+
retryStrategy:
52+
enabled: fasle
53+
forceProcess: false
4354
queueName: QUEUE_NAME
4455
parallelism: 5
4556
jobQueue:

0 commit comments

Comments
 (0)