From 3659185b527b2c4ef453c900288adcf85d4221f5 Mon Sep 17 00:00:00 2001 From: Timur Shemsedinov Date: Tue, 24 Oct 2023 20:56:43 +0300 Subject: [PATCH] Optimize tests and remove unneeded --- application/lib/metacomTest/start.js | 16 ---------------- application/lib/task1/start.js | 16 +++++++--------- 2 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 application/lib/metacomTest/start.js diff --git a/application/lib/metacomTest/start.js b/application/lib/metacomTest/start.js deleted file mode 100644 index 92d05d46..00000000 --- a/application/lib/metacomTest/start.js +++ /dev/null @@ -1,16 +0,0 @@ -async () => { - if (!config.examples.metacom) return; - if (application.worker.id !== 'W1') return; - setTimeout(async () => { - const url = 'http://127.0.0.1:8001/api'; - const metacom = metarhia.metacom.Metacom.create(url); - setTimeout(async () => { - await metacom.load('auth', 'console', 'example', 'files'); - const res = await metacom.api.auth.signin({ - login: 'marcus', - password: 'marcus', - }); - console.log({ res }); - }, 1000); - }, 2000); -}; diff --git a/application/lib/task1/start.js b/application/lib/task1/start.js index bcc97297..74849857 100644 --- a/application/lib/task1/start.js +++ b/application/lib/task1/start.js @@ -1,13 +1,11 @@ async () => { if (!config.examples.scheduler) return; if (application.worker.id !== 'W1') return; - setTimeout(async () => { - const res = await application.scheduler.add({ - name: 'name', - every: 'Sep 10th 10s', - args: { i: 2 }, - run: 'lib.task1.f1', - }); - console.log('Add task', res); - }, 1000); + const res = await application.scheduler.add({ + name: 'name', + every: 'Oct 19th 10s', + args: { i: 2 }, + run: 'lib.task1.f1', + }); + console.log('Add task', res); };