mirror of
https://github.com/fluencelabs/registry.git
synced 2025-04-25 10:12:13 +00:00
initTopicAndSubscribeBlocking: remove 'co'
This commit is contained in:
parent
69aed67517
commit
0ef7dc9f7b
@ -59,7 +59,7 @@ func initTopicAndSubscribeBlocking(
|
|||||||
result <- AquaDHT.put_value(topic, value, t, relay_id, service_id, 0)
|
result <- AquaDHT.put_value(topic, value, t, relay_id, service_id, 0)
|
||||||
if result.success:
|
if result.success:
|
||||||
results <<- result
|
results <<- result
|
||||||
co progress(n)
|
progress(n)
|
||||||
<- results!0
|
<- results!0
|
||||||
|
|
||||||
-- Create a topic and make the given node a subscriber to it
|
-- Create a topic and make the given node a subscriber to it
|
||||||
|
@ -5,8 +5,9 @@ import { initTopicAndSubscribeBlocking, findSubscribers } from "./generated/expo
|
|||||||
async function main() {
|
async function main() {
|
||||||
// connect to the Fluence network
|
// connect to the Fluence network
|
||||||
await Fluence.start({ connectTo: krasnodar[1] });
|
await Fluence.start({ connectTo: krasnodar[1] });
|
||||||
let topic = "myTopic";
|
let topic = "myTopic" + new Date().valueOf();
|
||||||
let value = "myValue";
|
let value = "myValue";
|
||||||
|
console.log("Will create topic", topic);
|
||||||
// create topic (if not exists) and subscribe on it
|
// create topic (if not exists) and subscribe on it
|
||||||
let relay = Fluence.getStatus().relayPeerId;
|
let relay = Fluence.getStatus().relayPeerId;
|
||||||
await initTopicAndSubscribeBlocking(
|
await initTopicAndSubscribeBlocking(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user