fix(core.gbapp): Fix deployer group.
This commit is contained in:
parent
f24eb63082
commit
ed67da171c
2 changed files with 3 additions and 2 deletions
|
@ -423,6 +423,7 @@ ENDPOINT_UPDATE=true
|
||||||
let instances: IGBInstance[];
|
let instances: IGBInstance[];
|
||||||
try {
|
try {
|
||||||
instances = await core.loadInstances();
|
instances = await core.loadInstances();
|
||||||
|
const group = GBConfigService.get('CLOUD_GROUP')??GBConfigService.get('BOT_ID');
|
||||||
if (process.env.ENDPOINT_UPDATE === 'true') {
|
if (process.env.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}...`);
|
||||||
|
@ -430,7 +431,7 @@ ENDPOINT_UPDATE=true
|
||||||
|
|
||||||
await installationDeployer.updateBotProxy(
|
await installationDeployer.updateBotProxy(
|
||||||
instance.botId,
|
instance.botId,
|
||||||
GBConfigService.get('BOT_ID'),
|
group,
|
||||||
`${proxyAddress}/api/messages/${instance.botId}`
|
`${proxyAddress}/api/messages/${instance.botId}`
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -267,7 +267,7 @@ export class GBDeployer implements IGBDeployer {
|
||||||
const username = GBConfigService.get('CLOUD_USERNAME');
|
const username = GBConfigService.get('CLOUD_USERNAME');
|
||||||
const password = GBConfigService.get('CLOUD_PASSWORD');
|
const password = GBConfigService.get('CLOUD_PASSWORD');
|
||||||
const accessToken = await GBAdminService.getADALTokenFromUsername(username, password);
|
const accessToken = await GBAdminService.getADALTokenFromUsername(username, password);
|
||||||
const group = GBConfigService.get('CLOUD_GROUP');
|
const group = GBConfigService.get('CLOUD_GROUP')??GBConfigService.get('BOT_ID');
|
||||||
const subscriptionId = GBConfigService.get('CLOUD_SUBSCRIPTIONID');
|
const subscriptionId = GBConfigService.get('CLOUD_SUBSCRIPTIONID');
|
||||||
|
|
||||||
// If the bot already exists, just update the endpoint.
|
// If the bot already exists, just update the endpoint.
|
||||||
|
|
Loading…
Add table
Reference in a new issue