mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-06-01 13:01:38 +00:00
update ttl
This commit is contained in:
parent
edc8b79cd5
commit
e45d2f7283
@ -8,6 +8,6 @@ export async function callArrowCall(): Promise<string> {
|
||||
let result = 'Hello, ' + a + '!';
|
||||
resolve(result);
|
||||
return result;
|
||||
});
|
||||
}, {ttl: 10000});
|
||||
});
|
||||
}
|
||||
|
12
src/examples/closures.ts
Normal file
12
src/examples/closures.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Fluence } from '@fluencelabs/fluence';
|
||||
// import { smth, registerLocalSrv } from '../compiled/examples/closures';
|
||||
import { relays } from '../config'
|
||||
|
||||
export async function closuresCall() {
|
||||
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
|
||||
const selfPeerId = Fluence.getPeer().getStatus().peerId;
|
||||
|
||||
// registerLocalSrv({inside: () => console.log("call inside")})
|
||||
|
||||
// return smth(relays[2].peerId, relays[3].peerId)
|
||||
}
|
@ -14,6 +14,6 @@ export async function coCall(): Promise<string[]> {
|
||||
return new Promise<string[]>((resolve, reject) => {
|
||||
parFunc(relayPeerId, (c) => {
|
||||
resolve(c.external_addresses);
|
||||
});
|
||||
}, {ttl: 10000});
|
||||
});
|
||||
}
|
||||
|
@ -4,12 +4,12 @@ import { iterateAndPrint, iterateAndPrintParallel } from '../compiled/examples/f
|
||||
export async function foldCall() {
|
||||
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
|
||||
|
||||
await iterateAndPrint([relayPeerId]);
|
||||
await iterateAndPrint([relayPeerId], {ttl: 10000});
|
||||
|
||||
return new Promise<string[]>((resolve, reject) => {
|
||||
iterateAndPrintParallel([relayPeerId], (c) => {
|
||||
console.log('iterateAndPrintParallel. external addresses: ' + c.external_addresses);
|
||||
resolve(c.external_addresses);
|
||||
});
|
||||
}, {ttl: 10000});
|
||||
});
|
||||
}
|
||||
|
@ -3,5 +3,5 @@ import { tryCatchTest } from '../compiled/examples/tryCatch';
|
||||
|
||||
export async function tryCatchCall(): Promise<string[]> {
|
||||
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
|
||||
return await tryCatchTest(relayPeerId);
|
||||
return await tryCatchTest(relayPeerId, {ttl: 10000});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user