How to make, that documents which were not updated a certain amount of time, were deleted?

return Promise.all(prod.map(product => { return Product.findOneAndUpdate( {siteID: product[0]}, { siteID: product[0], sex: product[1], subcategory: product[2], expireAfterSeconds : 3600, } 
  • expireAfterSeconds: 3600. I set this parameter for each document. But they are deleted after 30 seconds. - Dmitry Filippov

0