mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 21:47:58 +00:00
20 lines
443 B
JavaScript
20 lines
443 B
JavaScript
'use strict';
|
|
|
|
const { testService } = require('./testservice');
|
|
|
|
async function testServices({ server, settings, makeId }) {
|
|
const services = await server
|
|
.storage
|
|
.store('smartyellow/webservice')
|
|
.find({ autotestEnabled: true })
|
|
.toArray();
|
|
|
|
services.forEach(async service => {
|
|
if (service.autotestEnabled) {
|
|
testService({ service, server, settings, makeId });
|
|
}
|
|
});
|
|
}
|
|
|
|
module.exports = { testServices };
|