fix : edu 批量修改图片
This commit is contained in:
parent
405eed0957
commit
3c1634b797
|
@ -150,8 +150,14 @@ class CertificateViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
|||
# Fetch the objects to update
|
||||
Certificate.objects.filter(id__in=ids).update(**updates)
|
||||
queryset = Certificate.objects.filter(id__in=ids)
|
||||
thread = threading.Thread(target=make_img_x, args=(queryset,))
|
||||
thread.start()
|
||||
threads = []
|
||||
for obj in queryset:
|
||||
thread = threading.Thread(target=make_img_x, args=(obj,))
|
||||
threads.append(thread)
|
||||
thread.start()
|
||||
|
||||
for thread in threads:
|
||||
thread.join()
|
||||
# # Update the objects
|
||||
# for obj in objects:
|
||||
# # for field, value in updates.items():
|
||||
|
|
Loading…
Reference in New Issue