|
@@ -20,17 +20,15 @@ export class HttpCheckController {
|
|
|
await this.db.open();
|
|
await this.db.open();
|
|
|
const configs = await this.db.getHttpCheckConfigs();
|
|
const configs = await this.db.getHttpCheckConfigs();
|
|
|
|
|
|
|
|
- configs.forEach(async conf => {
|
|
|
|
|
|
|
+ for (const conf of configs) {
|
|
|
if (!conf) return;
|
|
if (!conf) return;
|
|
|
if (!conf.active) return;
|
|
if (!conf.active) return;
|
|
|
|
|
|
|
|
- const sub = await this.scheduleCheck(conf);
|
|
|
|
|
|
|
+ await this.scheduleCheck(conf);
|
|
|
|
|
|
|
|
- process.nextTick(async () => {
|
|
|
|
|
- Logger.info('[INFO] Initial HTTP Service Check for', conf.title, '...');
|
|
|
|
|
- await this.timerTick(conf);
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ Logger.info('[INFO] Initial HTTP Service Check for', conf.title, '...');
|
|
|
|
|
+ await this.timerTick(conf);
|
|
|
|
|
+ }
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
Logger.error('[FATAL] Initializing ServerConnector failed:', err);
|
|
Logger.error('[FATAL] Initializing ServerConnector failed:', err);
|
|
|
Logger.error('[EXITING]');
|
|
Logger.error('[EXITING]');
|