javascript - Start background process in node (loopback) -
i trying start process in loopback "archives" part of database every 5 minutes. right starting archiver bootscript schedule every 5 minutes via setinterval:
// boot/start_archiver.js setinterval(function(){ console.log("starting archiver"); building_archiver.archivebuildings(); room_archiver.archiverooms(); }, 300000); // archive every 5 minutes
i have feeling not correct way of doing this, seems loopback api unresponsive whenever archiver runs.
how can outsource archiver call different process runs separate api? can point me in right direction or me find framework?
Comments
Post a Comment