ayHaru 4 lat temu
rodzic
commit
ea332b9196

+ 0 - 1
application/index/controller/Index.php

@@ -29,7 +29,6 @@ class Index
             json_success($result['data']);
         }
     }
-
     public function CheckFcode(){
         $code = input('param.code');
         $result = http_get($this->mAdminUrl . '/CheckFcode' ,['code' => $code]);

+ 7 - 1
docker-compose-test.yml

@@ -26,6 +26,9 @@ services:
     command: [docker-php-fpm-start]
     depends_on:
       - accredis
+    extra_hosts:
+      - "docker.hostip:172.18.0.1"
+      - "eth.hostip:172.17.153.106"
 
   accphp:
     image: php-zts-debug:7.3.18
@@ -66,4 +69,7 @@ services:
         - $PWD/conf/crontab/root:/var/spool/cron/crontabs/root
         - $PWD/conf/crontab/docker-start:/usr/local/bin/docker-start
     container_name: "acc-crontab"
-    command: [docker-start]
+    command: [docker-start]
+    extra_hosts:
+      - "docker.hostip:172.18.0.1"
+      - "eth.hostip:172.17.153.106"

+ 4 - 1
docker-compose-windows.yml

@@ -7,7 +7,7 @@ services:
       - "8088:8088"
     volumes:
       - /d/phpstudy_pro/WWW/access/conf/etc/localtime:/etc/localtime:ro
-      - /d/phpstudy_pro/WWW/access/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
+      - /d/phpstudy_pro/WWW/access/conf/nginx/nginx-test-http.conf:/etc/nginx/nginx.conf:ro
       - /d/phpstudy_pro/WWW/access:/var/www/html
     links:
       - accfpm
@@ -53,6 +53,9 @@ services:
       - /d/phpstudy_pro/WWW/access/conf/queue/docker-queue-start:/usr/local/bin/docker-queue-start
     container_name: "acc-queue"
     command: [docker-queue-start]
+    extra_hosts:
+      - "docker.hostip:172.18.0.1"
+      - "eth.hostip:172.17.153.106"
 
   acccrontab:
     image: php-zts-debug:7.3.18

+ 1 - 0
extend/queue.logic.php

@@ -151,6 +151,7 @@ class queue_logic
                         $data['box_status'] = $value['result'];
 
                         $ret = http_request($update_url,$resp,'POST');
+                        $ret = json_decode($ret,true);
                         if($ret == false || $ret['code'] != 0) {
                             Log::record("update box state error: cabinet={$cabinet['cabinet_code']},box={$box['box_number']}",log::DEBUG);
                         }

+ 1 - 1
other/config.ini.php

@@ -1,3 +1,3 @@
 <?php
 
-require_once(BASE_ROOT_PATH . '/other/config.mac.php');
+require_once(BASE_ROOT_PATH . '/other/config.test.php');

+ 2 - 1
other/config.test.php

@@ -1,5 +1,6 @@
 <?php
 
 $other_config['net_queue']['name'] = 'net_access_queue';
-$other_config['net_queue']['host'] = 'docker.hostip';
+//$other_config['net_queue']['host'] = 'docker.hostip';
+$other_config['net_queue']['host'] = '39.97.239.116';
 $other_config['net_queue']['port'] = 6380;

+ 4 - 4
queue/queuehandler.php

@@ -16,10 +16,10 @@ class queuehandler
         $port = $other_config['net_queue']['port'];
         if (ob_get_level()) ob_end_clean();
 
-        pcntl_signal(SIGINT,  [$this,'sig_handler']);
-        pcntl_signal(SIGHUP,  [$this,'sig_handler']);
-        pcntl_signal(SIGQUIT, [$this,'sig_handler']);
-        pcntl_signal(SIGTERM, [$this,'sig_handler']);
+//        pcntl_signal(SIGINT,  [$this,'sig_handler']);
+//        pcntl_signal(SIGHUP,  [$this,'sig_handler']);
+//        pcntl_signal(SIGQUIT, [$this,'sig_handler']);
+//        pcntl_signal(SIGTERM, [$this,'sig_handler']);
 
         $logic_queue = new queue_logic();
         $worker = new QueueServer($queue_name,$host,$port);