Commit baecd668 authored by 吴升宇's avatar 吴升宇

Merge branch 'xqf' into 'master'

Xqf

See merge request !548
parents 9961e525 63207719
......@@ -236,15 +236,15 @@ class CollectData(object):
device_tag_ctr = LikeDeviceTagStat.objects.using(settings.SLAVE1_DB_NAME).filter(
device_id=device_id, tag_id=tag_id).values("tag_ctr_30")
if device_tag_ctr:
device_tag_ctr_value = device_tag_ctr[0].get("tag_ctr_30", 0.1)
device_tag_ctr_value = device_tag_ctr[0].get("tag_ctr_30", 0.001)
else:
device_tag_ctr_value = 0.1
device_tag_ctr_value = 0.001
logging.info("get_device_tag_ctr" + str(device_id) + str(tag_id))
return device_tag_ctr_value
except:
logging_exception()
logging.error("get_device_tag_ctr error!")
return 0.1
return 0.001
def consume_data_from_kafka(self,topic_name=None):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment