修复最后更新时间不修改的问题

main
RogerWork 11 months ago
parent de7c1c4234
commit 30cd5eef5a
  1. 6
      update/utils/get_version.py

@ -4,6 +4,7 @@ from multiprocessing import cpu_count
from update.models import Cinema from update.models import Cinema
import queue import queue
import threading import threading
import datetime
class GetVersion(object): class GetVersion(object):
@ -68,10 +69,11 @@ class GetVersion(object):
print(res) print(res)
update_data = { update_data = {
'sys_ver': res['server_version'], 'sys_ver': res['server_version'],
'client_ver': res['client_version'] 'client_ver': res['client_version'],
'update_time': datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%d %H:%M:%S')
} }
print(update_data) print(update_data)
Cinema.objects.filter(ip=ip).update(**update_data) cinema_obj = Cinema.objects.filter(ip=ip).update(**update_data)
if __name__ == '__main__': if __name__ == '__main__':

Loading…
Cancel
Save