Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
Why does Node reset the values in NEDB databases?

I have built an app that connects to an api. For this discussion, let's just call it api X. Api X provides data that is updated on a monthly basis, but the exact date when new data is published varies. My NodeJS application is basically built to check api X twice per day (this is a Cron job) and see if new data has been published. If it has, my app will download the latest data and store it in an NEDB database. https://github.com/louischatriot/nedb My app is deployed on Heroku, where I have the basic dyno "web", for $7/month. This app allows me to always check the latest data in a quick and easy way and mostly I have no trouble with it. But something weird is happening. Sometimes it seems the database "resets". When I uploaded the app to Heroku from my local pc, the database was updated until December. The app quickly self-updates to include january and february, as these are the latest published datas. But sometimes when I check my app to view the data, it only has up until December. It is as if the app has been reset to the state it was in when I uploaded. The app of course quickly gets back the Jan and Feb data, as the Cron job is running. But it's a problem for me that this reset keeps happening. I don't know how often it happens, because I haven't observed many instances of this. Does anyone know why this might be happening and what I can do about it?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda