Answer the question
In order to leave comments, you need to log in
Run nodejs function periodically without memory leak?
It is necessary to store a number in mongo every second. How to implement it?
Wrote a simple function:
function test_save(){
var item = new Testmodel({
data: 123
});
item.save(function(err, item){
if(err)throw(err);
setTimeout(test_save, 1000);
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question