9932e0a0 by 冯轩

fix

1 parent 5218f898
No preview for this file type
......@@ -2035,8 +2035,9 @@ class Command(BaseCommand, LoggerMixin):
result_class = HILOCRResult if is_ca else HILSEOCRResult
else:
result_class = AFCOCRResult if is_ca else AFCSEOCRResult
res_obj = result_class.objects.select_for_update().filter(application_id=doc.application_id).first()
with transaction.atomic():
res_obj = result_class.objects.select_for_update().filter(application_id=doc.application_id).first()
self.online_log.info('{0} [sql lock application_id={1}]'.format(self.log_base, doc.application_id))
if res_obj is None:
res_obj = result_class()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!