pleboeuf / ErabliCollecteur

Collecteur de données brutes
2 stars 1 forks source link

Crash after re-opening stream #27

Open elecnix opened 6 years ago

elecnix commented 6 years ago
Tue Apr 10 2018 02:22:21 GMT-0400 (EDT) No events received in 660000ms. Re-opening event stream.
Tue Apr 10 2018 02:22:21 GMT-0400 (EDT) Stream ended! Will re-open.
/home/nmarchildon/repos/ErabliCollecteur/app.js:160
    db.each(sql, function (err, row) {
       ^

TypeError: db.each is not a function
    at requestAllDeviceReplay (/home/nmarchildon/repos/ErabliCollecteur/app.js:160:8)
    at Timeout._onTimeout (/home/nmarchildon/repos/ErabliCollecteur/app.js:152:13)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
elecnix commented 6 years ago

My internet connection was down, but it shouldn't crash.

pleboeuf commented 6 years ago

No, it should not crash. That will have to wait until tonight.

The program is not big. Maybe TypeScript conversion and compilation in strict mode would help pinpoint problems.

pleboeuf commented 6 years ago

Yesterday I had the same problem. Although, this has to be fixed, in production the Collecteur would be restarted automatically since it is run as a service.