domains: validate domain configs in a cron

no email notification yet, we have to rework this notifications/eventlog stuff
This commit is contained in:
Girish Ramakrishnan
2025-02-17 19:01:53 +01:00
parent 3d31f73453
commit 12794a499d
6 changed files with 50 additions and 8 deletions
+1 -7
View File
@@ -27,6 +27,7 @@ exports = module.exports = {
TYPE_UPDATE_UBUNTU: 'ubuntuUpdate',
TYPE_BOX_UPDATE: 'boxUpdate',
TYPE_MANUAL_APP_UPDATE_NEEDED: 'manualAppUpdate',
TYPE_DOMAIN_CONFIG_CHECK_FAILED: 'domainConfigCheckFailed',
// these work off singleton types
pin,
@@ -303,13 +304,6 @@ async function pin(type, title, message, options) {
assert.strictEqual(typeof message, 'string');
assert.strictEqual(typeof options, 'object');
// these are singletons. only one notification of such a type can be there
if (type !== exports.TYPE_DISK_SPACE && type !== exports.TYPE_MAIL_STATUS && type !== exports.TYPE_REBOOT && type !== exports.TYPE_UPDATE_UBUNTU &&
type !== exports.TYPE_BOX_UPDATE && type !== exports.TYPE_MANUAL_APP_UPDATE_NEEDED) {
debug(`pin: notification of ${type} cannot be pinned`);
return null;
}
const result = await getByType(type, options.context || '');
if (!result) {
await onPin(type);