diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index c0e63b56..316657c2 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -58,11 +58,11 @@ def db_insert_mplogx(): if count > 400: raise Exception("db inset count > 400") cursor.execute( - "select id, val, tag_code, update_time from tag_value where id > %s order by id, update_time", (last_tag_id)) + "select id, val, tag_code, update_time from tag_value where id > %s order by id, update_time", (last_tag_id, )) rows = cursor.fetchall() # 获取数据后保存至本地 if rows: last_tag_id = rows[-1][0] - MyThread(target=db_insert_mplogx_batch, args=(rows,)).start() + db_insert_mplogx_batch(rows) update_sysconfig({'enm': {'last_tag_id': last_tag_id}})