mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
add configuration for STS parallel message processing (#19279)
* add configuration for parallel processing * update setting description * vbump sts * enable feature for dev by default
This commit is contained in:
@@ -20,6 +20,7 @@ const configLogRetentionMinutes = 'logRetentionMinutes';
|
||||
const configLogFilesRemovalLimit = 'logFilesRemovalLimit';
|
||||
const extensionConfigSectionName = 'mssql';
|
||||
const configLogDebugInfo = 'logDebugInfo';
|
||||
const parallelMessageProcessingConfig = 'parallelMessageProcessing';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -92,6 +93,18 @@ export function getConfigTracingLevel(): string {
|
||||
}
|
||||
}
|
||||
|
||||
export async function getParallelMessageProcessingConfig(): Promise<boolean> {
|
||||
const config = getConfiguration();
|
||||
if (!config) {
|
||||
return false;
|
||||
}
|
||||
const quality = await getProductQuality();
|
||||
const setting = config.inspect(parallelMessageProcessingConfig);
|
||||
// For dev environment, we want to enable the feature by default unless it is set explicitely.
|
||||
// Note: the quality property is not set for dev environment, we can use this to determine whether it is dev environment.
|
||||
return (quality === undefined && setting.globalValue === undefined && setting.workspaceValue === undefined) ? true : config[parallelMessageProcessingConfig];
|
||||
}
|
||||
|
||||
export function getLogFileName(prefix: string, pid: number): string {
|
||||
return `${prefix}_${pid}.log`;
|
||||
}
|
||||
@@ -352,3 +365,8 @@ export async function getOrDownloadServer(config: IConfig, handleServerEvent?: (
|
||||
|
||||
return serverdownloader.getOrDownloadServer();
|
||||
}
|
||||
|
||||
async function getProductQuality(): Promise<string> {
|
||||
const content = await fs.readFile(path.join(vscode.env.appRoot, 'product.json'));
|
||||
return JSON.parse(content?.toString())?.quality;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user