-
Notifications
You must be signed in to change notification settings - Fork 18
Multi import of “slowly absorbed meal” #14
Comments
oh wow ... that shouldn't happen. Which version of the bridge are you running on? There was a bug in versions 0.7.1 to 0.7.4 where it could happen that events were imported multiple times. Never seen anything like this before though. Seems like in each iteration, it imports all of the past events again. Usually, the loop is designed to only load events between the last known event (+1s) and the current time which should prevent processing events multiple times. |
Did the duplication of events stop after the 0.6 correction bolus? Because that would probably mean that the slowly absorbed meal events were for some reason not considered as standard boli and therefore the algorithm always started the search for events after the last "normal" bolus or carb correction. |
Looks like it’s a problem with the webspace / Script / something else. all carbs got multiplied |
in the database there are multible entries like:
|
This morning I cleared all treatments in mongo db, since nightscout website was not able to reload. Afterwards I redeployed and everything was running smooth. A meal bolus worked fine, but then another "slowly absorbed meal" Bolus was added and it started again. Eyery 4 minutes 2-3 treatment entries are pushed ito the database. So the multible entries are growing eveytime the diasend script ist checking for new values and treatments. As already pointed out before, this behavior started since I moved to the railway stack. |
I've also seen this issue yesterday with a "normal" bolus - not really sure what's going on there. Will take a deeper look in the upcoming days. But for me, this happened in heroku so I don't think it's an exclusive Railway thing. But it definitely appears to only happen under certain conditions. Sorry for the troubles there. For now, you might also be able to downgrade to an older version, like e.g. 0.7.0. In that version, some events may go missing because the loops for CGM and other events like boli or carbs are not separate yet but likely this also prevents them from being imported multiple times. |
My two cents (but I would not call myself a developer at all): If I compare the datasets from diasend api for type: carb ("slowly absorbed meal) it has a created at timestamp that is converted into an epoch ts as attribute in nightscout / mongo "date" field. But there is also the "created at" field in nightscout / mongodb which gets a slighty different value every time (I guess) the importer sript runs again. Dublicated dataset:
Wouldnt it be better to use the same TS from diasend for both "created at" and "date" in mongo db? So duplikates would be overriden automatically ? |
As far as I understood nightscout, it never overrides entries but always creates new ones. If you want to override an entry, you need to manually delete and recreate it. |
The multiple import of events should be solved with version 0.7.7. |
Ran this for a few days now for testing purposes and couldn't reproduce the multi-import issue anymore. Closing this issue. Feel free to reopen if you still encounter issues. |
slowly absorbed meal carbohydrates somehow sometimes got imported multiple times. I could not figure out so far when and why it happens.
See pictures:
See pictures:
The text was updated successfully, but these errors were encountered: