diff --git a/backend/src/matrix-bot/outbound-queue.js b/backend/src/matrix-bot/outbound-queue.js index 0d0864f..bdf08b9 100644 --- a/backend/src/matrix-bot/outbound-queue.js +++ b/backend/src/matrix-bot/outbound-queue.js @@ -23,7 +23,7 @@ const processOutboundQueue = async ({ type, ...args }) => { } }; -const outboundQueue = fastq(processOutboundQueue, 1); +const outboundQueue = fastq.promise(processOutboundQueue, 1); // Pause outbound queue until matrixClient and targetRoomId are set outboundQueue.pause(); @@ -32,6 +32,7 @@ const setTargetRoomId = async (roomId) => { console.log('target room ID:', targetRoomId); await applicationData.put('targetRoomId', targetRoomId); if (matrixClient) { + console.log('Starting Matrix outbound queue processor'); outboundQueue.resume(); } }; @@ -46,6 +47,7 @@ const initializeOutboundQueue = async (matrixClient_) => { console.warn('target room ID is not set -- will not be able to send messages until it is set. Use !target '); } if (targetRoomId) { + console.log('Starting Matrix outbound queue processor'); outboundQueue.resume(); } };