Delete MongoDB document at specific time

后端 未结 4 1210
别那么骄傲
别那么骄傲 2020-12-09 12:41

I am looking into deleting a document at a specific time.

const TestSchema = new Schema({
 expire_at: {
 type: Date,
 },
}, {
 timestamps: true,
});
TestSche         


        
4条回答
  •  北海茫月
    2020-12-09 13:03

    Deletion process runs after 60 seconds. So document can be there for 59 seconds after the deletion time has been passed.

提交回复
热议问题