Bläddra i källkod

add multi ai-translate worker support

Jeremy Zheng 11 månader sedan
förälder
incheckning
8d3c001563
2 ändrade filer med 14 tillägg och 3 borttagningar
  1. 1 1
      deploy/group_vars/all.yml
  2. 13 2
      deploy/mint.yml

+ 1 - 1
deploy/group_vars/all.yml

@@ -11,4 +11,4 @@ app_open_search_version: "2.19.1"
 app_php_version: "8.1"
 app_php_memory_limit: "128M"
 app_container_prefix: "mint"
-app_consumer_loop_limit_ai_translate: 128
+app_consumer_loop_limit_ai_translate: 16

+ 13 - 2
deploy/mint.yml

@@ -65,7 +65,18 @@
       ansible.builtin.systemd_service:
         name: "{{ app_container_prefix }}-{{ app_domain }}-fpm-{{ app_php_fpm_port }}"
         enabled: true
-        state: restarted
+        state: started
+        scope: user
+
+- name: Start mint php-fpm
+  hosts:
+    - ai_translate
+  tasks:
+    - name: Start ai-translate service
+      ansible.builtin.systemd_service:
+        name: "{{ app_container_prefix }}-{{ app_domain }}-worker-mq-ai.translate"
+        enabled: true
+        state: started
         scope: user
 
 - name: Setup nginx
@@ -81,6 +92,6 @@
     - name: Enable schedule run timer
       ansible.builtin.systemd_service:
         name: "{{ app_domain }}-scheduler.timer"
-        state: restarted
+        state: started
         enabled: true
         scope: user