Skip to content

Commit

Permalink
Merge pull request #8413 from microsoft/wangmi/fix
Browse files Browse the repository at this point in the history
initialize telemetry asynchronously to avoid possible ui blocking if  it takes too much time.
  • Loading branch information
wangmingliang-ms committed May 14, 2024
2 parents cf271d8 + f983f09 commit 128e98c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ private void setEnabled(boolean enabled) {
this.cbIngress.setEditable(enabled);
this.cbExternalAccess.setEnabled(enabled);
this.cbExternalAccess.setEditable(enabled);
this.intMaxReplicas.setEnabled(enabled);
this.intMinReplicas.setEnabled(enabled);
}

private void refreshToolbar() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.microsoft.azure.toolkit.lib.common.proxy.ProxyInfo;
import com.microsoft.azure.toolkit.lib.common.proxy.ProxyManager;
import com.microsoft.azure.toolkit.lib.common.task.AzureRxTaskManager;
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemeter;
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetry;
import com.microsoft.azure.toolkit.lib.common.utils.InstallationIdUtils;
Expand Down Expand Up @@ -57,10 +58,12 @@ public void appFrameCreated(@Nonnull List<String> commandLineArgs) {
IntellijStore.getInstance(), IntelliJSecureStore.getInstance());
initProxy();
initializeConfig();
initializeTelemetry();
// workaround fixes for web app on linux run configuration
AzureDockerSupportConfigurationType.registerConfigurationFactory("Web App for Containers", DeprecatedWebAppOnLinuxDeployConfigurationFactory::new);
IdeAzureAccount.getInstance().restoreSignin(); // restore sign in
AzureTaskManager.getInstance().runOnPooledThread(() -> {
initializeTelemetry();
IdeAzureAccount.getInstance().restoreSignin(); // restore sign in
});
} catch (final Throwable t) {
log.error(t.getMessage(), t);
}
Expand Down

0 comments on commit 128e98c

Please sign in to comment.