From 121c9f9320b787159d5aff9ba84d169ffd224155 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Tue, 29 Dec 2020 17:45:21 +0900 Subject: [PATCH] [Service] Apply worker to 'standalone' model 'standalone' model will not be used anywhere. TV will apply global wrt-service on Tizen 6.5 Change-Id: I1ebe5fbea6a9db4f56c1d9fb0c58cfa7e76fdb63 Signed-off-by: DongHyun Song --- wrt_app/common/service_manager.ts | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index 14f0a87..face443 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -12,10 +12,6 @@ Object.defineProperty(global, 'serviceType', { writable: false }); -function isStandalone() { - return global['serviceType'] === 'STANDALONE'; -} - function createWorker(id: string, startService: string, filename: string) { if (workers[id]) return; @@ -49,26 +45,13 @@ function terminateWorker(id: string, delay: number) { export function startService(id: string, filename: string) { console.log(`startService - ${id}`); - if (isStandalone()) { - runner = require('../common/service_runner'); - runner.start(id, filename); - } else { - let startService = `${__dirname}/service_runner.js`; - createWorker(id, startService, filename); - } + let startService = `${__dirname}/service_runner.js`; + createWorker(id, startService, filename); } export function stopService(id: string) { console.log(`stopService - ${id}`); - if (isStandalone()) { - if (!runner) { - console.log('runner instance is null in standalone mode'); - return; - } - runner.stop(id); - } else { - terminateWorker(id, 500); - } + terminateWorker(id, 500); } export function handleBuiltinService(serviceId: string, serviceName: string) { -- 2.7.4