INNER CODE UNIT · TypeScript

wait

tot-ra/graphql-schema-registry · src/redis/index.ts:15

async function wait(ms) {
	return new Promise((resolve, reject) => {
		setTimeout(() => {
			reject(new Error(`Executed timeout after ${ms} ms`));
		}, ms);
	});
}

async function resolveInstance(service) {
	try {
		const {
			host,
			port,
			username,
			secret: password,
			db,
		} = await diplomat.getServiceInstance(service);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…