Skip to content

Commit

Permalink
Improves the events to relint documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Dec 22, 2024
1 parent b0e612c commit 73ce5a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ connection.onNotification(
'connectionUpdated',
(connectionSettings: Neo4jSettings) => {
changeConnection(connectionSettings);
neo4jSchemaPoller.events.on('connectionConnected', relintAllDocuments);
neo4jSchemaPoller.events.once('schemaFetched', relintAllDocuments);
},
);

Expand Down
4 changes: 2 additions & 2 deletions packages/schema-poller/src/metadataPoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ export class MetadataPoller {
this.dbPollingInterval = undefined;
}

async startBackgroundPolling(intervalSeconds = 30) {
startBackgroundPolling(intervalSeconds = 30) {
this.stopBackgroundPolling();
await this.fetchDbSchema();
void this.fetchDbSchema();
this.dbPollingInterval = setInterval(
() => void this.fetchDbSchema(),
intervalSeconds * 1000,
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-poller/src/schemaPoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class Neo4jSchemaPoller {
);

this.metadata = new MetadataPoller(databases, this.connection, this.events);
await this.metadata.startBackgroundPolling();
this.metadata.startBackgroundPolling();
}

private async initializeDriver(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ suite('Auto completion spec', () => {
});
});

test.skip('Completes started property with backticks', async () => {
test('Completes started property with backticks', async () => {
const position = new vscode.Position(1, 22);

const expected: vscode.CompletionItem[] = [
Expand Down

0 comments on commit 73ce5a1

Please sign in to comment.