Last active
March 10, 2020 11:54
-
-
Save wuestkamp/237be313e4ffa0752ce3b649f557fa87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: agent | |
spec: | |
replicas: 8 | |
selector: | |
matchLabels: | |
id: agent-pod | |
template: | |
metadata: | |
labels: | |
id: agent-pod | |
spec: | |
terminationGracePeriodSeconds: 3600 | |
containers: | |
- name: agent | |
lifecycle: | |
preStop: | |
exec: | |
command: ["sh", "-c", "touch /tmp/kill_me"] | |
command: | |
- /bin/sh | |
- -c | |
- > | |
sleep 3 && rm -rf var/cache/* && bin/console cache:clear && | |
while ! [ -f /tmp/kill_me ]; | |
do | |
bin/console messenger:consume queue --limit=1 --time-limit=60 -vv | |
done; | |
image: my-symfony-agent-image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment