LingxinMeng 9 months ago
parent
commit
23a8cf70f0

+ 2 - 0
src/python2/pjibot_delivery/callback-kill.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+ps aux | grep 'python2 callback.py' | grep -v grep | awk '{print $2}' | xargs kill -9

+ 8 - 0
src/python2/pjibot_delivery/callback-nohup.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
+nohup python2 callback.py > log/callback.out 2>&1 &

+ 2 - 0
src/python2/pjibot_delivery/callback-tail.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+tail -f log/callback.log

+ 3 - 4
src/python2/pjibot_delivery/pjibot_callback.py → src/python2/pjibot_delivery/callback.py

@@ -19,9 +19,7 @@ key4 = 'data_parse/'
 path2 = 'data/'
 path3 = 'data_merge/'
 path4 = 'data_parse/'
-# url1_public = "http://1.202.169.139:9081/device/auth"
 url1_private = "http://10.14.86.147:9081/device/auth"
-# url2_public = " http://1.202.169.139:9081/device/data/callback"
 url2_private = "http://10.14.86.147:9081/device/data/callback"
 
 
@@ -129,8 +127,9 @@ if __name__ == '__main__':
                             logging.exception("callback报错:%s", str(e))
                             continue
 
-                        # 将时区统一
-                        new_date = add_hour(old_date, 8)
+                        # 将时区统一(室内机器人需要加8,室外不需要了)
+                        # new_date = add_hour(old_date, 8)
+                        new_date = old_date
                         old_delete_list = []
                         for obj_old in oss2.ObjectIterator(bucket, prefix=old_file_path):
                             old_delete_list.append(str(obj_old.key))

+ 6 - 1
src/python2/pjibot_delivery/camera-nohup.sh

@@ -1,3 +1,8 @@
 #!/bin/bash
-mkdir ./log
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
 nohup python2 camera.py > log/camera.out 2>&1 &

+ 6 - 1
src/python2/pjibot_delivery/csv-nohup.sh

@@ -1,3 +1,8 @@
 #!/bin/bash
-mkdir ./log
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
 nohup python2 csv-.py > log/csv.out 2>&1 &

+ 6 - 1
src/python2/pjibot_delivery/merge-nohup.sh

@@ -1,3 +1,8 @@
 #!/bin/bash
-mkdir ./log
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
 nohup python2 merge.py > log/merge.out 2>&1 &

+ 6 - 1
src/python2/pjibot_delivery/pcd-nohup.sh

@@ -1,3 +1,8 @@
 #!/bin/bash
-mkdir ./log
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
 nohup python2 pcd.py > log/pcd.out 2>&1 &

+ 6 - 1
src/python2/pjibot_delivery/xosc-nohup.sh

@@ -1,3 +1,8 @@
 #!/bin/bash
-mkdir ./log
+if [ ! -d "./log" ]; then
+    mkdir "./log"
+    echo "Directory './log' created."
+else
+    echo "Directory './log' already exists."
+fi
 nohup python2 xosc.py > log/xosc.out 2>&1 &

+ 0 - 2
src/python2/pjibot_guide/pjibot_callback.py

@@ -19,9 +19,7 @@ key4 = 'data_parse/'
 path2 = 'data/'
 path3 = 'data_merge/'
 path4 = 'data_parse/'
-# url1_public = "http://1.202.169.139:9081/device/auth"
 url1_private = "http://10.14.86.147:9081/device/auth"
-# url2_public = " http://1.202.169.139:9081/device/data/callback"
 url2_private = "http://10.14.86.147:9081/device/data/callback"