diff --git a/src/documentprinter/documentprinterclient.js b/src/documentprinter/documentprinterclient.js index 03e88f2..991b754 100644 --- a/src/documentprinter/documentprinterclient.js +++ b/src/documentprinter/documentprinterclient.js @@ -299,10 +299,13 @@ export class DocumentPrinterClient { async updateJobState(jobId, state) { logger.info(`Updating job state for ${jobId}`); + const notify = + state?.type !== "deploying" && state?.type !== "queued"; await this.socketClient.editObject({ _id: jobId, objectType: "documentJob", updateData: { state: state }, + notify, }); logger.info(`Updated job state for ${jobId}:`, state); } diff --git a/src/socket/socketclient.js b/src/socket/socketclient.js index 44abaa9..4b99cca 100644 --- a/src/socket/socketclient.js +++ b/src/socket/socketclient.js @@ -430,7 +430,14 @@ export class SocketClient { }); } - async editObject({ objectType, _id, populate, updateData, auditLog = true }) { + async editObject({ + objectType, + _id, + populate, + updateData, + auditLog = true, + notify = true, + }) { logger.trace("Editing object...", { objectType, _id, @@ -445,6 +452,7 @@ export class SocketClient { populate, updateData, auditLog, + notify, }, (result) => { if (result && result.error) {