Fix rule action not triggered due to the page index not being refreshed after page creation

This commit is contained in:
Hongbo Wu 2022-12-10 13:27:32 +08:00
parent fcb4e859f8
commit 3347e81e39

View file

@ -212,7 +212,7 @@ export const createPage = async (
updatedAt: new Date(),
savedAt: new Date(),
},
refresh: ctx.refresh,
refresh: 'wait_for', // wait for the index to be refreshed before returning
})
page.id = body._id as string
@ -240,7 +240,7 @@ export const updatePage = async (
updatedAt: new Date(),
},
},
refresh: ctx.refresh,
refresh: 'wait_for', // wait for the index to be refreshed before returning
retry_on_conflict: 3,
})