c5da20e0 by 冯轩

MOD:模拟下单支持zip

1 parent 1bac9311
...@@ -1288,9 +1288,14 @@ class DocView(DocGenericView, DocHandler): ...@@ -1288,9 +1288,14 @@ class DocView(DocGenericView, DocHandler):
1288 classify_1 = 29 1288 classify_1 = 29
1289 self.running_log.info('[dzfp process] [doc_id={0}]'.format(doc.id)) 1289 self.running_log.info('[dzfp process] [doc_id={0}]'.format(doc.id))
1290 1290
1291 is_zip = False
1292 if document_name.endswith('.zip') or document_name.endswith('.rar') or document_name.endswith('.ZIP') \
1293 or document_name.endswith('.RAR'):
1294 is_zip = True
1295
1291 # tasks = ['{0}{1}{2}'.format(prefix, consts.SPLIT_STR, doc.id)] 1296 # tasks = ['{0}{1}{2}'.format(prefix, consts.SPLIT_STR, doc.id)]
1292 task = consts.SPLIT_STR.join([prefix, str(doc.id), str(classify_1)]) 1297 task = consts.SPLIT_STR.join([prefix, str(doc.id), str(classify_1)])
1293 enqueue_res = rh.enqueue([task], is_priority) 1298 enqueue_res = rh.enqueue([task], is_priority, is_zip)
1294 1299
1295 self.running_log.info('[mock doc upload success] [args={0}] [business_type={1}] [doc_id={2}] ' 1300 self.running_log.info('[mock doc upload success] [args={0}] [business_type={1}] [doc_id={2}] '
1296 '[is_priority={3}] [enqueue_res={4}]'.format(args, prefix, doc.id, 1301 '[is_priority={3}] [enqueue_res={4}]'.format(args, prefix, doc.id,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!