From 7b0c0a7420128e0ccf772a905c43c4804be712fc Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 15 Nov 2023 15:59:27 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20Added=20the=20importSingleIssue=20a?= =?UTF-8?q?ction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/socket.service.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/services/socket.service.ts b/services/socket.service.ts index 43559fa..8b0f52d 100644 --- a/services/socket.service.ts +++ b/services/socket.service.ts @@ -134,14 +134,14 @@ export default class SocketService extends Service { sessionRecord.length !== 0 && sessionRecord[0].sessionId === sessionId ) { - // 2. Find if the queue has active jobs + // 2. Find if the queue has active, paused or waiting jobs const jobs: JobType = await this.broker.call( "jobqueue.getJobCountsByType", {} ); - const { active } = jobs; + const { active, paused, waiting } = jobs; - if (active > 0) { + if (active > 0 || paused > 0 || waiting > 0) { // 3. Get job counts const completedJobCount = await pubClient.get( "completedJobCount" @@ -189,6 +189,15 @@ export default class SocketService extends Service { {} ); }, + importSingleIssue: async (ctx: Context<{}>) => { + console.info("AirDC++ finished a download -> "); + console.log(ctx.params); + // await this.broker.call( + // "library.importDownloadedComic", + // { bundle: data }, + // {} + // ); + }, }, methods: {}, async started() {