From c27cf5c186efa74d5ffd920fd405ccef00be2a08 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Fri, 24 Feb 2023 09:45:56 +0100 Subject: [PATCH] Moved runtime --- index.js | 6 +++--- lib/runtime.js => runtime.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename lib/runtime.js => runtime.js (97%) diff --git a/index.js b/index.js index c0af867..05bcfe5 100644 --- a/index.js +++ b/index.js @@ -327,7 +327,7 @@ module.exports = { return; } - const runtime = fork(__dirname + '/lib/runtime.js'); + const runtime = fork(__dirname + '/runtime.js'); runtime.send({ command: 'testAll', services }); runtime.on('message', message => { @@ -458,7 +458,7 @@ module.exports = { entity: [ 'smartyellow/webservice' ], purpose: 'Check whether services are up and send a notification if not.', handler: ({ item }) => { - const runtime = fork(__dirname + '/lib/runtime.js'); + const runtime = fork(__dirname + '/runtime.js'); runtime.send({ command: 'testOne', service: item }); runtime.on('message', message => { if (message.error) { @@ -535,7 +535,7 @@ module.exports = { requires: 'smartyellow/status/editServices', handler: async (req, res, user) => { const item = await server.storage({ user }).store('smartyellow/webservice').get(req.params[0]); - const runtime = fork(__dirname + '/lib/runtime.js'); + const runtime = fork(__dirname + '/runtime.js'); runtime.send({ command: 'testOne', service: item }); runtime.on('message', async message => { res.json(message); diff --git a/lib/runtime.js b/runtime.js similarity index 97% rename from lib/runtime.js rename to runtime.js index 9a71368..bfeaac6 100644 --- a/lib/runtime.js +++ b/runtime.js @@ -1,8 +1,8 @@ 'use strict'; const fetch = require('node-fetch'); -const { operators } = require('./operators'); -const { realValues } = require('./realvalues'); +const { operators } = require('./lib/operators'); +const { realValues } = require('./lib/realvalues'); const http = require('http'); const https = require('https');