Skip to content

Commit

Permalink
feat: add pause, resume and isPaused commands
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Jul 1, 2020
1 parent cc259ef commit cf34cc6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<any>queue)["isPaused"]();
respond(msg.id, isPaused);
break;
default:
console.error(
`Missing command ${data.cmd}. Too old version of taskforce-connector?`
Expand Down

0 comments on commit cf34cc6

Please sign in to comment.