🔧 Auto-watcher-importer now batches jobs in the queue
This commit is contained in:
@@ -147,10 +147,12 @@ export default class ApiService extends Service {
|
|||||||
basePathToWalk: path,
|
basePathToWalk: path,
|
||||||
});
|
});
|
||||||
console.log(walkedFolder);
|
console.log(walkedFolder);
|
||||||
await this.broker.call(
|
await this.broker.call("libraryqueue.enqueue", {
|
||||||
"import.processAndImportToDB",
|
fileObject: {
|
||||||
{ walkedFolder }
|
filePath: walkedFolder[0].filePath,
|
||||||
);
|
size: walkedFolder[0].fileSize,
|
||||||
|
},
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
setTimeout(
|
setTimeout(
|
||||||
checkFileCopyComplete,
|
checkFileCopyComplete,
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ export const extractCoverFromFile2 = async (
|
|||||||
fileObject: any
|
fileObject: any
|
||||||
): Promise<any> => {
|
): Promise<any> => {
|
||||||
try {
|
try {
|
||||||
console.log("ASDASD!@#!#!@#!@#");
|
|
||||||
console.log(fileObject);
|
|
||||||
const { filePath, fileSize} = fileObject;
|
const { filePath, fileSize} = fileObject;
|
||||||
|
|
||||||
const calibre = new Calibre();
|
const calibre = new Calibre();
|
||||||
|
|||||||
Reference in New Issue
Block a user