MessageReceiver: Pause processing of new messages on suspend
This commit is contained in:
parent
8cd557ff91
commit
d74424a3b8
2 changed files with 19 additions and 1 deletions
|
@ -187,6 +187,22 @@ export default class MessageReceiver
|
|||
|
||||
private stoppingProcessing?: boolean;
|
||||
|
||||
pause(): void {
|
||||
this.incomingQueue.pause();
|
||||
this.encryptedQueue.pause();
|
||||
this.decryptedQueue.pause();
|
||||
this.appQueue.pause();
|
||||
log.info('MessageReceiver: Paused');
|
||||
}
|
||||
|
||||
resume(): void {
|
||||
this.appQueue.start();
|
||||
this.decryptedQueue.start();
|
||||
this.encryptedQueue.start();
|
||||
this.incomingQueue.start();
|
||||
log.info('MessageReceiver: Resumed');
|
||||
}
|
||||
|
||||
constructor({ server, storage, serverTrustRoot }: MessageReceiverOptions) {
|
||||
super();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue