Fix exception and add configmaps
This commit is contained in:
parent
308902e62c
commit
813e2034d4
4
Tiltfile
4
Tiltfile
@ -18,6 +18,10 @@ k8s_yaml(configmap_from_dict("mev-inspect-rpc", inputs = {
|
|||||||
"url" : os.environ["RPC_URL"],
|
"url" : os.environ["RPC_URL"],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
k8s_yaml(configmap_from_dict("mev-inspect-rpc-list, inputs = {
|
||||||
|
"list" : os.environ["RPC_URL"],
|
||||||
|
}))
|
||||||
|
|
||||||
k8s_yaml(configmap_from_dict("mev-inspect-listener-healthcheck", inputs = {
|
k8s_yaml(configmap_from_dict("mev-inspect-listener-healthcheck", inputs = {
|
||||||
"url" : os.getenv("LISTENER_HEALTHCHECK_URL", default=""),
|
"url" : os.getenv("LISTENER_HEALTHCHECK_URL", default=""),
|
||||||
}))
|
}))
|
||||||
|
@ -85,6 +85,11 @@ spec:
|
|||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: mev-inspect-rpc
|
name: mev-inspect-rpc
|
||||||
key: url
|
key: url
|
||||||
|
- name: RPC_LIST
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: mev-inspect-rpc-list
|
||||||
|
key: list
|
||||||
- name: LISTENER_HEALTHCHECK_URL
|
- name: LISTENER_HEALTHCHECK_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
@ -118,7 +123,7 @@ spec:
|
|||||||
{{- range .Values.extraEnv }}
|
{{- range .Values.extraEnv }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
value: {{ .value }}
|
value: {{ .value }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
@ -3,7 +3,6 @@ import logging
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import dramatiq
|
import dramatiq
|
||||||
from aiohttp.client_exceptions import ClientOSError
|
|
||||||
from aiohttp_retry import ExponentialRetry, RetryClient
|
from aiohttp_retry import ExponentialRetry, RetryClient
|
||||||
|
|
||||||
from mev_inspect.block import get_latest_block_number
|
from mev_inspect.block import get_latest_block_number
|
||||||
@ -129,7 +128,8 @@ async def ping_healthcheck_url(url):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
run()
|
run()
|
||||||
except ClientOSError or ConnectionRefusedError:
|
except Exception as e:
|
||||||
if rpc_list is not None:
|
logger.error(e)
|
||||||
|
if rpc_list is not None and CURRENT_RPC < len(rpc_list):
|
||||||
rpc = rpc_list[CURRENT_RPC + 1]
|
rpc = rpc_list[CURRENT_RPC + 1]
|
||||||
run()
|
run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user