Commit 7616bf2596787222ad693968c61a6889f5813f97

Authored by Adhidarma Hadiwinoto
1 parent a384705113
Exists in master

Touch matrix.systemd_notified on invoking sd-notify

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -4,11 +4,15 @@
4 4 const MODULE_NAME = 'KOMODO-SDK.SD-NOTIFY';
5 5  
6 6 const logger = require('tektrans-logger');
  7 +const matrix = require('./matrix');
7 8  
8 9 module.exports = () => {
9 10 try {
10 11 const notify = require('sd-notify');
  12 +
11 13 notify.ready();
  14 + matrix.systemd_notified = new Date();
  15 +
12 16 logger.info(`${MODULE_NAME} 701F8400: Systemd ready notification has been sent`);
13 17 } catch (e) {
14 18 logger.warn(`${MODULE_NAME} A6C99938: Optional dependency not found: sd-notify`);