totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

F.global seem to become empty after application run for few days #728

Closed elomraydino closed 5 years ago

elomraydino commented 5 years ago

Hi I load some config values fron database and store them in F.global. But after some days the F.global become empty. I look in the code but find no where i overwrite it. I'm usin version 3.2.4.

F.on('load', function(){
    //Load settings from db.
    var Setting = MODEL('setting').schema;
    Setting.find({
        alive: true,
    }).then((settings) => {
        settings.forEach(setting => {
            F.global[setting.ref] = setting.value;
        });
        console.log('Settings loaded');
    }).catch((err) => {
        console.log('Error loading settings', err.message);
    });
});
petersirka commented 5 years ago

Not possible (I belive). F.global isn't cleared ... there bust be another problem or another part which rewrites it.

elomraydino commented 5 years ago

OK! I will take a closer look at my code.