From cf34cc6084222f051c89de8a95edf13e8ee6a40b Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Wed, 1 Jul 2020 14:41:46 +0200 Subject: [PATCH] feat: add pause, resume and isPaused commands --- lib/socket.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/socket.ts b/lib/socket.ts index bfa5ce8..67ad099 100644 --- a/lib/socket.ts +++ b/lib/socket.ts @@ -222,6 +222,18 @@ module.exports = ( await queue.empty(); respond(msg.id); break; + case "pause": + await queue.pause(); + respond(msg.id); + break; + case "resume": + await queue.resume(); + respond(msg.id); + break; + case "isPaused": + const isPaused = await (queue)["isPaused"](); + respond(msg.id, isPaused); + break; default: console.error( `Missing command ${data.cmd}. Too old version of taskforce-connector?`