feat: db_ins_mplogx bill_date bug

This commit is contained in:
caoqianming 2024-12-23 18:31:02 +08:00
parent cbcba52ff4
commit 27e3dfa3b3
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
# Create your tasks here
from __future__ import absolute_import, unicode_literals
from apps.utils.tasks import CustomTask
from celery import shared_task
from apps.enm.models import MpLogx, Mpoint, MpointStat, EnStat, EnStat2, Xscript
@ -96,9 +95,9 @@ def db_ins_mplogx():
cursor.execute(query, (bill_date, tuple(batchs)))
rows = cursor.fetchall() # 获取数据后保存至本地
if rows:
bill_date = rows[-1][-1]
bill_date_x = rows[-1][-1]
db_insert_mplogx_batch(rows)
update_sysconfig({'enm1': {'bill_date': str(bill_date)}})
update_sysconfig({'enm1': {'bill_date': bill_date_x.strftime('%Y-%m-%d %H:%M:%S')}})