From 50a2f45e71e126305effc43a8887b0aa25cdf288 Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Thu, 26 May 2022 23:17:10 +0200 Subject: [PATCH] get ops blocking stop/exit --- packages/status-js/.scripts/example copy 2.ts | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/status-js/.scripts/example copy 2.ts b/packages/status-js/.scripts/example copy 2.ts index 24e20ed..12526da 100644 --- a/packages/status-js/.scripts/example copy 2.ts +++ b/packages/status-js/.scripts/example copy 2.ts @@ -1,16 +1,30 @@ -import { createClient } from "../src/client" +// import wtfnode from 'wtfnode' +// [WTF Node?] open handles: +// - Timers: +// node_modules/wtfnode/index.js:43 +// - (84600000 ~ 23 hr) (anonymous) @ //status-im/status-web/node_modules/promise-timeout/index.js:26 // libp2p +// node_modules/wtfnode/index.js:43 +// - Intervals: +// node_modules/wtfnode/index.js:43 +// - (300000 ~ 5 min) (anonymous) @ //status-im/status-web/node_modules/js-waku/src/lib/waku.ts:431 // js-waku + +import { createClient } from '../src/client' import { Community } from '../src/community' import { Messenger } from '../src/messenger' // const COMMUNITY_PUBLIC_KEY = '0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26' -const COMMUNITY_PUBLIC_KEY = '0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883efca753e8f3882f3bd' // compressed +const COMMUNITY_PUBLIC_KEY = + '0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883efca753e8f3882f3bd' // compressed ;(async () => { const client = await createClient() // Retrieve Community's metadata (e.g. description) - const community = await Community.instantiateCommunity(COMMUNITY_PUBLIC_KEY, client) + const community = await Community.instantiateCommunity( + COMMUNITY_PUBLIC_KEY, + client + ) // // Retrieve and subscribe to messages // const messenger = await Messenger.create(, client) @@ -18,4 +32,6 @@ const COMMUNITY_PUBLIC_KEY = '0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883 // messenger.addObserver(() => {}) await client.stop() + + // wtfnode.dump() })()