cbfbl / Apartment-web

minus alpha web for my apartment
0 stars 0 forks source link

Heroku server down bug makes Indices reset #4

Closed cbfbl closed 5 years ago

cbfbl commented 6 years ago

Everytime heroku shut down the server ( after 30 minutes of no use ) the data in active_indices.json is not saved and when the website is restarted heroku loads the old indices.

cbfbl commented 6 years ago

possible errors :

  1. fs.writeFileSync does not saves the data ( like need to wait for a buffer or something ).
  2. I am not allowed to change the files in the servers\ or can not changed with code and must push to git
cbfbl commented 6 years ago

The reason is 2 , I will fix this using a database to store the indices.

cbfbl commented 6 years ago

fixed by using mongoDB and very ugly code :( .

cbfbl commented 5 years ago

as expected ugly code --> bug , seems like spinner 1 and 2 are swapped in initial.

cbfbl commented 5 years ago

fixed , code is still ugly