fix(property): optimize save performance, fix 2dsphere index error and make search indexing non-blocking
deploy-chabokan / deploy (push) Canceled after 0s

This commit is contained in:
2026-08-19 07:46:08 +03:30
parent 30ea3aed84
commit e63ac1ddf4
7 changed files with 193 additions and 82 deletions
@@ -0,0 +1,12 @@
const propertyService = require('../propertyService')
module.exports = (eventEmitter) => {
eventEmitter.on('updateProperty', async (propertyData) => {
try {
if (propertyData && propertyData._id) {
await propertyService.indexOneProperty(propertyData._id)
}
} catch (err) {
console.warn('Error in updateProperty event handler:', err.message)
}
})
}