public static void TranspilationCompleted(string projectId) { try { if (_kitsuneServer == null) { InitializeConnection(); } //Update the proejct status to IDLE on transpilation success UpdateKitsuneProjectStatus(new UpdateKitsuneProjectStatusRequestModel { ProjectId = projectId, ProjectStatus = ProjectStatus.IDLE }); #region Send Migration Report var amazonSqsHanlder = new AmazonSQSQueueHandlers <ReportGeneratorSQSModel>(AmazonAWSConstants.MigrationReportSQSUrl); ReportGeneratorSQSModel sqsModel = new ReportGeneratorSQSModel() { ProjectId = projectId }; amazonSqsHanlder.PushMessageToQueue(sqsModel, EnvironmentConstants.ApplicationConfiguration.AWSSQSConfiguration.AWS_AccessKey, EnvironmentConstants.ApplicationConfiguration.AWSSQSConfiguration.AWS_SecretKey); #endregion //Call screenshot API CreateAndUpdateDemoScreenShot(projectId); //Create Routing Tree APIHelper.CreateProjectRoute(projectId, true); try { ProjectConfigHelper projectConfigHelper = new ProjectConfigHelper(projectId); var isPublish = projectConfigHelper.IsAutoPublishEnabled(); //Auto Publish if (isPublish) { //Call publish API } } catch { } } catch (Exception ex) { //LOG } }
public void GetCurrentMode_should_return_correct_mode() { RegistryModeFactory.ClearConditions(); var mode = RegistryModeFactory.GetCurrentMode(); Console.WriteLine(mode); if (ProjectConfigHelper.IsInDebugMode()) { Assert.Equal(mode, RegistryMode.Debug); } if (ProjectConfigHelper.IsInReleaseMode()) { Assert.Equal(mode, RegistryMode.Release); } if (ProjectConfigHelper.IsInLiveMode()) { Assert.Equal(mode, RegistryMode.Live); } }