|
@@ -196,6 +196,19 @@ class EquipmentManagerV3(View):
|
|
di_qs = Device_Info.objects.filter(UID=uid)
|
|
di_qs = Device_Info.objects.filter(UID=uid)
|
|
di_qs.update(NickName=nickname)
|
|
di_qs.update(NickName=nickname)
|
|
if deviceData is not None and deviceData.__contains__('NickName') and us_qs[0].is_alexa:
|
|
if deviceData is not None and deviceData.__contains__('NickName') and us_qs[0].is_alexa:
|
|
|
|
+ file_path = '/'.join((BASE_DIR, 'static/test.log'))
|
|
|
|
+ file = open(file_path, 'a+')
|
|
|
|
+
|
|
|
|
+ file.write(uid)
|
|
|
|
+ file.write('------unEnter--')
|
|
|
|
+ file.write('\n')
|
|
|
|
+ file.write(userID)
|
|
|
|
+ file.write('\n')
|
|
|
|
+ file.write(nickname)
|
|
|
|
+ file.write('\n')
|
|
|
|
+ file.flush()
|
|
|
|
+ file.close()
|
|
|
|
+
|
|
asy = threading.Thread(target=ModelService.notify_alexa_add, args=(uid, userID, nickname))
|
|
asy = threading.Thread(target=ModelService.notify_alexa_add, args=(uid, userID, nickname))
|
|
asy.start()
|
|
asy.start()
|
|
# redisObj = RedisObject(db=8)
|
|
# redisObj = RedisObject(db=8)
|