Chore(index): Sync logs management (#11522)
**What** - Add index engine sync log information - Ad `setTimeout(0)` to give breath to the event loop and ensuring not blocking the event loop and allow for other tasks queue execution to happen while syncing here is an example: **LOG_LEVEL=info**  **LOG_LEVEL=debug** 
This commit is contained in:
@@ -31,6 +31,7 @@ Object.keys(config.modules).forEach((key) => {
|
||||
config.modules[Modules.INDEX] = {
|
||||
resolve: "@medusajs/index",
|
||||
dependencies: [
|
||||
ContainerRegistrationKeys.LOGGER,
|
||||
Modules.EVENT_BUS,
|
||||
Modules.LOCKING,
|
||||
ContainerRegistrationKeys.REMOTE_QUERY,
|
||||
|
||||
@@ -133,7 +133,7 @@ describe("IndexModuleService syncIndexConfig", function () {
|
||||
|
||||
afterEach(afterEach_)
|
||||
|
||||
it.only("should full sync all entities when the config has changed", async () => {
|
||||
it("should full sync all entities when the config has changed", async () => {
|
||||
await setTimeout(1000)
|
||||
|
||||
const currentMetadata = await indexMetadataService.list()
|
||||
@@ -191,6 +191,7 @@ describe("IndexModuleService syncIndexConfig", function () {
|
||||
;(index as any).buildSchemaObjectRepresentation_()
|
||||
|
||||
let configurationChecker = new Configuration({
|
||||
logger,
|
||||
schemaObjectRepresentation: (index as any).schemaObjectRepresentation_,
|
||||
indexMetadataService,
|
||||
indexSyncService,
|
||||
@@ -277,6 +278,7 @@ describe("IndexModuleService syncIndexConfig", function () {
|
||||
)
|
||||
|
||||
configurationChecker = new Configuration({
|
||||
logger,
|
||||
schemaObjectRepresentation: (index as any).schemaObjectRepresentation_,
|
||||
indexMetadataService,
|
||||
indexSyncService,
|
||||
|
||||
Reference in New Issue
Block a user