mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
FUS: start external uploader under progress (IDEA-228935)
GitOrigin-RevId: ce5fb27cfff49a42c98a4df2a2b94b8dac91e2f5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5463ca715b
commit
4aea7c6e6b
@@ -8,6 +8,10 @@ import com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider;
|
||||
import com.intellij.internal.statistic.eventLog.fus.FeatureUsageLogger;
|
||||
import com.intellij.internal.statistic.eventLog.uploader.EventLogExternalUploader;
|
||||
import com.intellij.openapi.application.ApplicationInfo;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class EventLogApplicationLifecycleListener implements AppLifecycleListener {
|
||||
|
||||
@@ -15,9 +19,13 @@ public class EventLogApplicationLifecycleListener implements AppLifecycleListene
|
||||
public void appWillBeClosed(boolean isRestart) {
|
||||
if (!isRestart && !PluginManagerCore.isRunningFromSources()) {
|
||||
StatisticsEventLoggerProvider config = FeatureUsageLogger.INSTANCE.getConfig();
|
||||
if (config.isSendEnabled()) {
|
||||
boolean isUpdateInProgress = isUpdateInProgress();
|
||||
EventLogExternalUploader.INSTANCE.startExternalUpload(config.getRecorderId(), false, isUpdateInProgress);
|
||||
if (config.isSendEnabled() && !isUpdateInProgress()) {
|
||||
ProgressManager.getInstance().run(new Task.Modal(null, "Starting External Log Uploader", false) {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
EventLogExternalUploader.INSTANCE.startExternalUpload(config.getRecorderId(), false, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user