feat: db_ins_mplogx bill_date bug
This commit is contained in:
parent
cbcba52ff4
commit
27e3dfa3b3
|
@ -1,5 +1,4 @@
|
||||||
# Create your tasks here
|
# Create your tasks here
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
from apps.utils.tasks import CustomTask
|
from apps.utils.tasks import CustomTask
|
||||||
from celery import shared_task
|
from celery import shared_task
|
||||||
from apps.enm.models import MpLogx, Mpoint, MpointStat, EnStat, EnStat2, Xscript
|
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)))
|
cursor.execute(query, (bill_date, tuple(batchs)))
|
||||||
rows = cursor.fetchall() # 获取数据后保存至本地
|
rows = cursor.fetchall() # 获取数据后保存至本地
|
||||||
if rows:
|
if rows:
|
||||||
bill_date = rows[-1][-1]
|
bill_date_x = rows[-1][-1]
|
||||||
db_insert_mplogx_batch(rows)
|
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')}})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue