This commit is contained in:
joy,zhou 2021-03-17 14:17:04 +08:00
parent 35144bd658
commit 70dcbb7f3e
4 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -6,7 +6,7 @@ fi
mkdir tmp
cp index.py tmp/
cd tmp
pip3 install -t . iotedge_application_link_sdk==0.0.1 #打包驱动SDK
pip3 install -t . iotedge_application_link_sdk==0.0.3 #打包驱动SDK
zip -r demo.zip .
cd ..
cp tmp/demo.zip .

View File

@ -75,7 +75,7 @@ class _natsClientSub(object):
global _msg_cb
_logger.debug("recv message:{} " .format(str(msg)))
try:
js = json.loads(msg)
js = json.loads(msg.data.decode())
topic = js['topic']
data = base64.b64decode(js['payload'])
if isinstance(topic, str) and topic.startswith("/$system/") and topic.count('/rrpc/request/') > 0:
@ -124,6 +124,7 @@ def publish(topic: str, msg: bytes):
payload = {
'src': "app",
'topic': topic,
"identity": _app_name,
'payload': str(payload_encode, encoding='utf-8')
}
data = {

View File

@ -7,7 +7,7 @@ if not (sys.version_info[0] == 3):
setup(
name='iotedge_application_link_sdk',
version='0.0.1',
version='0.0.3',
author='ucloud.cn',
url='https://pypi.org/project/iotedge_application_link_sdk/',
author_email='joy.zhou@ucloud.cn',