Skip to content

Commit

Permalink
fix(core): Clean up unused dependencies in DefaultSearchPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jun 18, 2019
1 parent 4775c2e commit 9b3cd26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export class DefaultSearchPlugin implements VendurePlugin {
];
}

/** @internal */
defineWorkers(): Array<Type<any>> {
return [
IndexerController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class IndexerController {
) {}

@MessagePattern(Message.Reindex)
reindex({ ctx: rawContext }: { ctx: any}): Observable<ReindexMessageResponse> {
reindex({ ctx: rawContext }: { ctx: any }): Observable<ReindexMessageResponse> {
const ctx = RequestContext.fromObject(rawContext);
return new Observable(observer => {
(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { Inject, Injectable, OnModuleDestroy } from '@nestjs/common';
import { ClientProxy } from '@nestjs/microservices';
import { InjectConnection } from '@nestjs/typeorm';
import { ID } from '@vendure/common/lib/shared-types';
import { Connection } from 'typeorm';

import { RequestContext } from '../../../api/common/request-context';
import { ConfigService } from '../../../config/config.service';
import { Logger } from '../../../config/logger/vendure-logger';
import { ProductVariant } from '../../../entity/product-variant/product-variant.entity';
import { Product } from '../../../entity/product/product.entity';
import { Job } from '../../../service/helpers/job-manager/job';
import { JobService } from '../../../service/services/job.service';
import { ProductVariantService } from '../../../service/services/product-variant.service';
import { VENDURE_WORKER_CLIENT } from '../../../worker/constants';
import { Message } from '../constants';

Expand All @@ -23,11 +19,8 @@ import { ReindexMessageResponse } from './indexer.controller';
@Injectable()
export class SearchIndexService implements OnModuleDestroy {

constructor(@InjectConnection() private connection: Connection,
@Inject(VENDURE_WORKER_CLIENT) private readonly client: ClientProxy,
private productVariantService: ProductVariantService,
private jobService: JobService,
private configService: ConfigService) {}
constructor(@Inject(VENDURE_WORKER_CLIENT) private readonly client: ClientProxy,
private jobService: JobService) {}

reindex(ctx: RequestContext): Job {
return this.jobService.createJob({
Expand Down

0 comments on commit 9b3cd26

Please sign in to comment.