Forráskód Böngészése

Merge branch 'test' of http://192.168.136.99:3000/servers/ASJServer

locky 3 éve
szülő
commit
381220e03c
2 módosított fájl, 1 hozzáadás és 19 törlés
  1. 1 1
      Ansjer/eur_config/formal_wsgi.py
  2. 0 18
      Object/IOTCore/IotObject.py

+ 1 - 1
Ansjer/eur_config/formal_wsgi.py

@@ -11,6 +11,6 @@ import os
 
 from django.core.wsgi import get_wsgi_application
 
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Ansjer.us_config.formal_settings")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Ansjer.eur_config.formal_settings")
 
 application = get_wsgi_application()

+ 0 - 18
Object/IOTCore/IotObject.py

@@ -137,24 +137,6 @@ class IOTClient:
                 templateBody=templateBody,
                 parameters=parameters
             )
-            topic_sql = "SELECT * FROM 'my/things/{}/shadow/update_lwt'".format(ThingName)
-            self.client.create_topic_rule(
-                ruleName=ThingName + '_LWT',
-                topicRulePayload={
-                    "sql": topic_sql,
-                    "ruleDisabled": False,
-                    "awsIotSqlVersion": "2016-03-23",
-                    'actions': [
-                        {
-                            'republish': {
-                                'roleArn': self.iot_role,
-                                'topic': '$$aws/things/' + ThingName + '/shadow/update',
-                                'qos': 1
-                            }
-                        }
-                    ]
-                }
-            )
             return res, parameters
         except Exception as e:
             print(e)