Bladeren bron

启动文件名修改

heshixin 16 uur geleden
bovenliggende
commit
6e557c1698
4 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 0 0
      chiller_temp_main.py
  2. 2 2
      communication/rabbitmq_link.py
  3. 1 1
      communication/rocketmq_link.py
  4. 1 1
      startup.sh

+ 0 - 0
main.py → chiller_temp_main.py


+ 2 - 2
communication/rabbitmq_link.py

@@ -79,13 +79,13 @@ class PikaMessage(object):
         """
         # self.publish_msg_to_delay_queue(body)
         data_from_rabbitmq = body.decode()
-        from main import main
+        from chiller_temp_main import main
         main(data_from_rabbitmq)
 
     @staticmethod
     def callback_delay(ch, method, properties, body):
         data_from_rabbitmq = body.decode()
-        from main import main
+        from chiller_temp_main import main
         main(data_from_rabbitmq)
 
     def consume(self):

+ 1 - 1
communication/rocketmq_link.py

@@ -126,7 +126,7 @@ class RocketClient:
         logger.critical(f'[RocketClient] send msg to  {topic}')
 
 def on_rocket_msg(msg:ReceivedMessage):
-    from main import main
+    from chiller_temp_main import main
     try:
         main(msg.body.decode())
         return ConsumeStatus.CONSUME_SUCCESS

+ 1 - 1
startup.sh

@@ -1,2 +1,2 @@
 source /opt/alg/alg_env/bin/activate && \
-nohup python3 main.py  >> /var/log/chillerTemp.log  2>&1 &
+nohup python3 chiller_temp_main.py  >> /var/log/chillerTemp.log  2>&1 &