@xuda.io/drive_module 1.1.928 → 1.1.929
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.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1696,8 +1696,8 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
};
|
|
1698
1698
|
|
|
1699
|
-
const ocr_drive_file = async function (doc) {
|
|
1700
|
-
const { drive_type,
|
|
1699
|
+
const ocr_drive_file = async function (app_id, doc) {
|
|
1700
|
+
const { drive_type, uid, file_path, originalname } = doc;
|
|
1701
1701
|
|
|
1702
1702
|
// const _region = process.env.XUDA_HOSTNAME;
|
|
1703
1703
|
let target_file = get_file_url(
|
|
@@ -1943,7 +1943,7 @@ exports.run_drive_pending_ocr = async function (req) {
|
|
|
1943
1943
|
|
|
1944
1944
|
const user_drive_res = await db_module.find_couch_query("xuda_drive", opt);
|
|
1945
1945
|
for await (let doc of user_drive_res.docs) {
|
|
1946
|
-
await ocr_drive_file(doc);
|
|
1946
|
+
await ocr_drive_file(null, doc);
|
|
1947
1947
|
}
|
|
1948
1948
|
|
|
1949
1949
|
let selector = {
|
|
@@ -1976,7 +1976,7 @@ exports.run_drive_pending_ocr = async function (req) {
|
|
|
1976
1976
|
const app_drive_res = await db_module.find_app_couch_query(app._id, opt);
|
|
1977
1977
|
for await (let doc of app_drive_res.docs) {
|
|
1978
1978
|
console.log(opt, doc);
|
|
1979
|
-
await ocr_drive_file(doc);
|
|
1979
|
+
await ocr_drive_file(app._id, doc);
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
1982
|
} catch (err) {
|