vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.77k stars 1.02k forks source link

SearchJobBufferService.runPendingSearchUpdates() not working #3101

Open rafapsm opened 1 month ago

rafapsm commented 1 month ago

Hi @michaelbromley

I'm trying to use the runPendingSearchUpdates function on a custom service that I created to add products via my frontend.

Here's my code:

export class CustomProductsService {
  constructor(
    private searchJobBufferService: SearchJobBufferService,
){}
    init(injector: Injector) {
        this.searchJobBufferService = injector.get(SearchJobBufferService)
      }
 if (input.enabled && !input.draft) {
    await this.triggerListingEvent(ctx, updatedProduct, userId);
    await this.searchJobBufferService.runPendingSearchUpdates();
  }

And this does not triggers any update to the elasticsearch. Do you have any idea?

rafapsm commented 1 month ago

@michaelbromley can you help you with this please?

rafapsm commented 1 month ago

Hey @michaelbromley,

Do you have any idea how to run only the pending search updates?