fix(all): Fix in bot proxy outdated columns.

This commit is contained in:
Rodrigo Rodriguez 2023-09-05 12:26:23 -03:00
parent 841588ca95
commit 1c41c9b915
2 changed files with 6 additions and 0 deletions

View file

@ -266,6 +266,11 @@ export class AzureDeployerService implements IGBInstallationDeployer {
} }
public async updateBotProxy(botId: string, group: string, endpoint: string) { public async updateBotProxy(botId: string, group: string, endpoint: string) {
if (!await this.botExists(botId)) {
GBLog.error(`Bot ${botId} does not exist on cloud.`);
return;
}
const baseUrl = `https://management.azure.com/`; const baseUrl = `https://management.azure.com/`;
const username = GBConfigService.get('CLOUD_USERNAME'); const username = GBConfigService.get('CLOUD_USERNAME');
const password = GBConfigService.get('CLOUD_PASSWORD'); const password = GBConfigService.get('CLOUD_PASSWORD');

View file

@ -433,6 +433,7 @@ ENDPOINT_UPDATE=true
await CollectionUtil.asyncForEach(instances, async instance => { await CollectionUtil.asyncForEach(instances, async instance => {
GBLog.info(`Updating bot endpoint for ${instance.botId}...`); GBLog.info(`Updating bot endpoint for ${instance.botId}...`);
try { try {
await installationDeployer.updateBotProxy( await installationDeployer.updateBotProxy(
instance.botId, instance.botId,
GBConfigService.get('CLOUD_GROUP'), GBConfigService.get('CLOUD_GROUP'),