[Service][TV] Refactor for wasm-caching shutdown 22/244522/7
authorDongHyun Song <dh81.song@samsung.com>
Mon, 21 Sep 2020 08:13:22 +0000 (17:13 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Thu, 24 Sep 2020 04:16:05 +0000 (04:16 +0000)
commitb6a74f93575992e34c406ae477fb00ba95f012f0
tree79cfc5d9c2b38115e751d1b591cb3f59ff8c65eb
parentc5297c3540f1761d8fa4caad0413efac64e4a765
[Service][TV] Refactor for wasm-caching shutdown

1) Calls delayShutdown() every wasm cache creation.
 - If built-in service is implemented with async functions, after
   run() is done and there is no running services, node main will
   be terminated by itself 1 minute later.
   delayShutdown() can reset the timeout to 1 min.

2) After finish wasm-caching, notify parent to terminate node worker
 - When wasm-caching is finished, node worker is able to terminate
   by stop messaging

Change-Id: I23b3587d3f3746a451b517c7cd7a70c5f9593302
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/common/service_manager.ts
wrt_app/service/builtins/wasm_builder.ts