Skip to content

Commit

Permalink
remove unused es client (#118426) (#118452)
Browse files Browse the repository at this point in the history
Co-authored-by: Mikhail Shustov <mikhail.shustov@elastic.co>
  • Loading branch information
kibanamachine and Mikhail Shustov committed Nov 12, 2021
1 parent d346480 commit d86ed90
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/plugins/telemetry/server/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
SavedObjectsClientContract,
SavedObjectsClient,
CoreStart,
ICustomClusterClient,
} from '../../../core/server';
import {
getTelemetryChannelEndpoint,
Expand Down Expand Up @@ -53,7 +52,6 @@ export class FetcherTask {
private isSending = false;
private internalRepository?: SavedObjectsClientContract;
private telemetryCollectionManager?: TelemetryCollectionManagerPluginStart;
private elasticsearchClient?: ICustomClusterClient;

constructor(initializerContext: PluginInitializerContext<TelemetryConfigType>) {
this.config$ = initializerContext.config.create();
Expand All @@ -67,7 +65,6 @@ export class FetcherTask {
) {
this.internalRepository = new SavedObjectsClient(savedObjects.createInternalRepository());
this.telemetryCollectionManager = telemetryCollectionManager;
this.elasticsearchClient = elasticsearch.createClient('telemetry-fetcher');

this.intervalId = timer(this.initialCheckDelayMs, this.checkIntervalMs).subscribe(() =>
this.sendIfDue()
Expand All @@ -78,9 +75,6 @@ export class FetcherTask {
if (this.intervalId) {
this.intervalId.unsubscribe();
}
if (this.elasticsearchClient) {
this.elasticsearchClient.close();
}
}

private async areAllCollectorsReady() {
Expand Down

0 comments on commit d86ed90

Please sign in to comment.