Skip to content

Commit

Permalink
revert changes to MergedRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
nbayindirli committed May 10, 2024
1 parent d685889 commit b686224
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions typescript/cli/src/registry/MergedRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class MergedRegistry extends BaseRegistry implements IRegistry {
}): Promise<void> {
return this.multiRegistryWrite(
async (registry) => await registry.addChain(chain),
`Adding chain ${chain.chainName}`,
`adding chain ${chain.chainName}`,
);
}

Expand All @@ -103,21 +103,21 @@ export class MergedRegistry extends BaseRegistry implements IRegistry {
}): Promise<void> {
return this.multiRegistryWrite(
async (registry) => await registry.updateChain(chain),
`Updating chain ${chain.chainName}`,
`updating chain ${chain.chainName}`,
);
}

async removeChain(chain: ChainName): Promise<void> {
return this.multiRegistryWrite(
async (registry) => await registry.removeChain(chain),
`Removing chain ${chain}`,
`removing chain ${chain}`,
);
}

async addWarpRoute(config: WarpCoreConfig): Promise<void> {
return this.multiRegistryWrite(
async (registry) => await registry.addWarpRoute(config),
'Adding warp route',
'adding warp route',
);
}

Expand All @@ -135,19 +135,19 @@ export class MergedRegistry extends BaseRegistry implements IRegistry {
for (const registry of this.registries) {
// TODO remove this when GithubRegistry supports write methods
if (registry.type === RegistryType.Github) {
this.logger.warn(`Skipping ${logMsg} at ${registry.type} registry`);
this.logger.warn(`skipping ${logMsg} at ${registry.type} registry`);
continue;
}
try {
this.logger.info(
`${logMsg} at ${registry.type} registry at ${registry.uri}`,
);
await writeFn(registry);
this.logger.info(`Done ${logMsg} at ${registry.type} registry`);
this.logger.info(`done ${logMsg} at ${registry.type} registry`);
} catch (error) {
// To prevent loss of artifacts, MergedRegistry write methods are failure tolerant
this.logger.error(
`Failure ${logMsg} at ${registry.type} registry`,
`failure ${logMsg} at ${registry.type} registry`,
error,
);
}
Expand Down

0 comments on commit b686224

Please sign in to comment.