mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
33dcd1c604
commit
f88ba439cb
6 changed files with 3 additions and 19 deletions
|
@ -15,12 +15,7 @@ Deleting a repo removes it from local storage and the Elasticsearch index.
|
|||
|
||||
[float]
|
||||
==== Reindex a repo
|
||||
You can set *Code* to automatically reindex imported repos at set intervals by set the following config in `kibana.yaml`.
|
||||
|
||||
[source,yaml]
|
||||
----
|
||||
xpack.code.disableIndexScheduler: false
|
||||
----
|
||||
*Code* automatically reindexes an imported repo at set intervals, but in some cases you might need to manually refresh the index. For example, you might refresh an index after a new language server is installed. Or, you might want to immediately update the index to the HEAD revision. Click *Reindex* to initiate a reindex.
|
||||
|
||||
In some cases you might need to manually refresh the index besides automatic indexing. For example, you might refresh an index after a new language server is installed. Or, you might want to immediately update the index to the HEAD revision. Click *Reindex* to initiate a reindex.
|
||||
|
||||
|
|
|
@ -35,9 +35,6 @@ Whitelist of protocols for git clone address. Defaults to `[ 'https', 'git', 'ss
|
|||
`xpack.code.security.enableGitCertCheck`::
|
||||
Whether enable HTTPS certificate check when clone from HTTPS URL.
|
||||
|
||||
`xpack.code.disableIndexScheduler`::
|
||||
Whether automatic index update is disabled. Defaults to `true`.
|
||||
|
||||
`xpack.code.maxWorkspace`::
|
||||
Maximal number of workspaces each language server allows to span. Defaults to `5`.
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ export const code = (kibana: any) =>
|
|||
enableGitCertCheck: Joi.boolean().default(true),
|
||||
}).default(),
|
||||
maxWorkspace: Joi.number().default(5), // max workspace folder for each language server
|
||||
disableIndexScheduler: Joi.boolean().default(false),
|
||||
enableGlobalReference: Joi.boolean().default(false), // Global reference as optional feature for now
|
||||
codeNodeUrl: Joi.string(),
|
||||
}).default();
|
||||
|
|
|
@ -230,9 +230,7 @@ async function initCodeNode(server: Server, serverOptions: ServerOptions, log: L
|
|||
const updateScheduler = new UpdateScheduler(updateWorker, serverOptions, esClient, log);
|
||||
const indexScheduler = new IndexScheduler(indexWorker, serverOptions, esClient, log);
|
||||
updateScheduler.start();
|
||||
if (!serverOptions.disableIndexScheduler) {
|
||||
indexScheduler.start();
|
||||
}
|
||||
indexScheduler.start();
|
||||
// Check if the repository is local on the file system.
|
||||
// This should be executed once at the startup time of Kibana.
|
||||
cloneScheduler.schedule();
|
||||
|
@ -261,9 +259,7 @@ async function initCodeNode(server: Server, serverOptions: ServerOptions, log: L
|
|||
|
||||
server.events.on('stop', () => {
|
||||
gitOps.cleanAllRepo();
|
||||
if (!serverOptions.disableIndexScheduler) {
|
||||
indexScheduler.stop();
|
||||
}
|
||||
indexScheduler.stop();
|
||||
updateScheduler.stop();
|
||||
queue.destroy();
|
||||
});
|
||||
|
|
|
@ -43,8 +43,6 @@ export class ServerOptions {
|
|||
|
||||
public readonly maxWorkspace: number = this.options.maxWorkspace;
|
||||
|
||||
public readonly disableIndexScheduler: boolean = this.options.disableIndexScheduler;
|
||||
|
||||
public readonly enableGlobalReference: boolean = this.options.enableGlobalReference;
|
||||
|
||||
public readonly lsp: LspOptions = this.options.lsp;
|
||||
|
|
|
@ -38,7 +38,6 @@ const TEST_OPTIONS = {
|
|||
},
|
||||
repos: [],
|
||||
maxWorkspace: 5, // max workspace folder for each language server
|
||||
disableIndexScheduler: true, // Temp option to disable index scheduler.
|
||||
};
|
||||
|
||||
export function createTestServerOption() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue