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