From 62dff2264d76e1b19b12788fc1029b32ec98b2c4 Mon Sep 17 00:00:00 2001 From: xianfuxing Date: Fri, 26 Apr 2019 15:07:01 +0800 Subject: [PATCH] add mosql device info update task --- apps/mosquito/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/mosquito/tasks.py b/apps/mosquito/tasks.py index fb6ce78..c5c5104 100644 --- a/apps/mosquito/tasks.py +++ b/apps/mosquito/tasks.py @@ -128,8 +128,8 @@ def update_latest_statistic(): @task() def update_mosq_device_info(): """ 更新mosquito的DeviceInfo表""" - d1 = D1.objects.values('device_id', flat=True) - d2 = DeviceInfo.objects.values('device_id', flat=True) + d1 = D1.objects.values_list('device_id', flat=True) + d2 = DeviceInfo.objects.values_list('device_id', flat=True) s1 = set(d1) s2 = set(d2) x = s1 - s2