fixed
This commit is contained in:
parent
35144bd658
commit
70dcbb7f3e
Binary file not shown.
|
@ -6,7 +6,7 @@ fi
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cp index.py tmp/
|
cp index.py tmp/
|
||||||
cd 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 .
|
zip -r demo.zip .
|
||||||
cd ..
|
cd ..
|
||||||
cp tmp/demo.zip .
|
cp tmp/demo.zip .
|
||||||
|
|
|
@ -75,7 +75,7 @@ class _natsClientSub(object):
|
||||||
global _msg_cb
|
global _msg_cb
|
||||||
_logger.debug("recv message:{} " .format(str(msg)))
|
_logger.debug("recv message:{} " .format(str(msg)))
|
||||||
try:
|
try:
|
||||||
js = json.loads(msg)
|
js = json.loads(msg.data.decode())
|
||||||
topic = js['topic']
|
topic = js['topic']
|
||||||
data = base64.b64decode(js['payload'])
|
data = base64.b64decode(js['payload'])
|
||||||
if isinstance(topic, str) and topic.startswith("/$system/") and topic.count('/rrpc/request/') > 0:
|
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 = {
|
payload = {
|
||||||
'src': "app",
|
'src': "app",
|
||||||
'topic': topic,
|
'topic': topic,
|
||||||
|
"identity": _app_name,
|
||||||
'payload': str(payload_encode, encoding='utf-8')
|
'payload': str(payload_encode, encoding='utf-8')
|
||||||
}
|
}
|
||||||
data = {
|
data = {
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ if not (sys.version_info[0] == 3):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='iotedge_application_link_sdk',
|
name='iotedge_application_link_sdk',
|
||||||
version='0.0.1',
|
version='0.0.3',
|
||||||
author='ucloud.cn',
|
author='ucloud.cn',
|
||||||
url='https://pypi.org/project/iotedge_application_link_sdk/',
|
url='https://pypi.org/project/iotedge_application_link_sdk/',
|
||||||
author_email='joy.zhou@ucloud.cn',
|
author_email='joy.zhou@ucloud.cn',
|
||||||
|
|
Loading…
Reference in New Issue