From a14578dbe411f74fd0a251503f4704cac32947aa Mon Sep 17 00:00:00 2001 From: olivermrbl Date: Wed, 16 Dec 2020 12:29:32 +0100 Subject: [PATCH] hotfix(medusa-plugin-contentful): Reuse Redis clients in Contentful plugin --- .../medusa-plugin-contentful/src/services/contentful.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/medusa-plugin-contentful/src/services/contentful.js b/packages/medusa-plugin-contentful/src/services/contentful.js index 6961527de4..5b879cef59 100644 --- a/packages/medusa-plugin-contentful/src/services/contentful.js +++ b/packages/medusa-plugin-contentful/src/services/contentful.js @@ -1,11 +1,10 @@ import _ from "lodash" import { BaseService } from "medusa-interfaces" import { createClient } from "contentful-management" -import redis from "redis" class ContentfulService extends BaseService { constructor( - { productService, productVariantService, eventBusService }, + { productService, redisClient, productVariantService, eventBusService }, options ) { super() @@ -22,9 +21,7 @@ class ContentfulService extends BaseService { accessToken: options.access_token, }) - this.redis_ = redis.createClient({ - url: options.redis_url, - }) + this.redis_ = redisClient } async getIgnoreIds_(type) {