fix: adjust
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2024-02-05 14:17:52 +08:00
parent dd65676fb1
commit 2093bbf9f6
2 changed files with 14 additions and 6 deletions

View File

@ -32,7 +32,7 @@ def load_rpc_client(apiflask_app):
rpc.init_app(apiflask_app, extra_config={
'INITIAL_CONNECTIONS': 2,
'MAX_CONNECTIONS': 10,
'POOL_RECYCLE': 360 # 6 分钟后过期所有已有链接
'POOL_RECYCLE': 1800 # 30 分钟后过期所有已有链接
})

View File

@ -13,19 +13,26 @@ services:
deploy:
mode: replicated
replicas: 2
resources:
reservations:
cpus: '0.02'
memory: 50M
limits:
cpus: '0.10'
memory: 300M
update_config:
parallelism: 1
failure_action: rollback
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
max_attempts: 1
window: 120s
placement:
constraints:
- 'node.role == worker'
networks:
- pzx-web-api-network
- ddk-network
# pzx-web-api-2:
# image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
# env_file:
@ -50,8 +57,9 @@ services:
# constraints:
# - 'node.role == worker'
# networks:
# - pzx-web-api-network
# - ddk-network
networks:
pzx-web-api-network:
ddk-network:
driver: overlay
attachable: true