fix(core.gbapp): Boot process fully tested.
This commit is contained in:
parent
657dd0b849
commit
a6d1f90bbf
3 changed files with 51 additions and 32 deletions
|
@ -170,7 +170,7 @@ export class GBAdminService implements IGBAdminService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isSharePointPath(path: string) {
|
public static isSharePointPath(path: string) {
|
||||||
return path.indexOf('sharepoint.com') > 0;
|
return path.indexOf('sharepoint.com') !== -1;
|
||||||
}
|
}
|
||||||
public static async deployPackageCommand(min: GBMinInstance, text: string, deployer: IGBDeployer) {
|
public static async deployPackageCommand(min: GBMinInstance, text: string, deployer: IGBDeployer) {
|
||||||
const packageName = text.split(' ')[1];
|
const packageName = text.split(' ')[1];
|
||||||
|
|
|
@ -853,6 +853,10 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async createServer(farmId, group, name, location) {
|
private async createServer(farmId, group, name, location) {
|
||||||
|
|
||||||
|
let tryed = false;
|
||||||
|
const create = async () => {
|
||||||
|
|
||||||
const parameters: Site = {
|
const parameters: Site = {
|
||||||
location: location,
|
location: location,
|
||||||
serverFarmId: farmId,
|
serverFarmId: farmId,
|
||||||
|
@ -881,8 +885,23 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.webSiteClient.webApps.createOrUpdateSourceControl(group, name, souceControlConfig);
|
await this.webSiteClient.webApps.createOrUpdateSourceControl(group, name, souceControlConfig);
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
return await create();
|
||||||
|
} catch (e) {
|
||||||
|
if (!tryed) {
|
||||||
|
tryed = true;
|
||||||
|
GBLog.info('Retrying Deploying Bot Server...');
|
||||||
|
try {
|
||||||
|
return await create();
|
||||||
|
} catch (error) {
|
||||||
|
GBLog.info('Server creation failed at all on MSAzure, stopping...');
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async updateWebisteConfig(group, name, serverFarmId, instance: IGBInstance) {
|
private async updateWebisteConfig(group, name, serverFarmId, instance: IGBInstance) {
|
||||||
|
|
|
@ -635,7 +635,7 @@ export class GBMinService {
|
||||||
// If there is WhatsApp configuration specified, initialize
|
// If there is WhatsApp configuration specified, initialize
|
||||||
// infrastructure objects.
|
// infrastructure objects.
|
||||||
|
|
||||||
if (min.instance.whatsappServiceUrl !== null) {
|
if (min.instance.whatsappServiceUrl) {
|
||||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||||
min,
|
min,
|
||||||
min.botId,
|
min.botId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue