From 30cd5eef5ad8ebad1cfd32fab16e64f767b746d9 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 19 Dec 2023 15:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=80=E5=90=8E=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=E4=B8=8D=E4=BF=AE=E6=94=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/get_version.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/update/utils/get_version.py b/update/utils/get_version.py index d206153..1feb34e 100644 --- a/update/utils/get_version.py +++ b/update/utils/get_version.py @@ -4,6 +4,7 @@ from multiprocessing import cpu_count from update.models import Cinema import queue import threading +import datetime class GetVersion(object): @@ -68,10 +69,11 @@ class GetVersion(object): print(res) update_data = { '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) - Cinema.objects.filter(ip=ip).update(**update_data) + cinema_obj = Cinema.objects.filter(ip=ip).update(**update_data) if __name__ == '__main__':