@xuda.io/drive_module 1.1.1364 → 1.1.1366
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +15 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1458,16 +1458,17 @@ const validate_drive_type = (drive_type) => {
|
|
|
1458
1458
|
};
|
|
1459
1459
|
|
|
1460
1460
|
export const run_drive_pending_ocr = async (req) => {
|
|
1461
|
+
const { uid } = req;
|
|
1461
1462
|
try {
|
|
1462
1463
|
let opt = {
|
|
1463
1464
|
selector: { docType: 'user_drive', ocr_stat: 1, stat: 3 },
|
|
1464
1465
|
limit: 1,
|
|
1465
1466
|
};
|
|
1466
1467
|
|
|
1467
|
-
const user_drive_res = await
|
|
1468
|
-
for await (let doc of user_drive_res.docs) {
|
|
1469
|
-
|
|
1470
|
-
}
|
|
1468
|
+
// const user_drive_res = await find_contact_query(uid, opt);
|
|
1469
|
+
// for await (let doc of user_drive_res.docs) {
|
|
1470
|
+
// await ocr_drive_file(null, doc);
|
|
1471
|
+
// }
|
|
1471
1472
|
|
|
1472
1473
|
let selector = {
|
|
1473
1474
|
docType: 'app',
|
|
@@ -1496,6 +1497,16 @@ export const run_drive_pending_ocr = async (req) => {
|
|
|
1496
1497
|
|
|
1497
1498
|
opt.selector.docType = 'workspace_drive';
|
|
1498
1499
|
for (let app of app_res.docs) {
|
|
1500
|
+
let opt = {
|
|
1501
|
+
selector: { docType: 'user_drive', ocr_stat: 1, stat: 3 },
|
|
1502
|
+
limit: 1,
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1505
|
+
const user_drive_res = await db_module.find_app_couch_query(app._id, opt);
|
|
1506
|
+
for await (let doc of user_drive_res.docs) {
|
|
1507
|
+
await ocr_drive_file(app._id, doc);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1499
1510
|
const app_drive_res = await db_module.find_app_couch_query(app._id, opt);
|
|
1500
1511
|
for await (let doc of app_drive_res.docs) {
|
|
1501
1512
|
await ocr_drive_file(app._id, doc);
|