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__':