domains: validate domain configs in a cron
no email notification yet, we have to rework this notifications/eventlog stuff
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user