Commit Graph
17 Commits
Author SHA1 Message Date
Sulka Haro 32163a0cd1 * Fix storage so tests pass with new Mongo driver
* Removes old openaps-storage feature
2023-06-01 22:45:07 +03:00
Sulka Haro 93ffb25147 Upgrade Mongo driver to latest legacy-API compatible version 2023-06-01 12:20:36 +03:00
Sulka HaroandGitHub dfa86a9c6a Fix memory leak and cache update issues in 14.0.4 (#6133)
* Fix a memory leak in 14.0.4
* Fix linter error in ddata.js
* Move data retention periods to caching
* Update _id of inserted entries and device status so merging to cache works correctly
* Reset the data in ddata before updating
* Fix typo on entry cache retention period
* Have device status cache retention period follow configuration
* Fix _id injection in treatments
2020-09-27 17:16:42 +03:00
Sulka Haro 54008a7122 Remove excess logging 2020-09-22 11:14:13 +03:00
Sulka Haro f878ce115b Add support for CGM data and device statuses. Refactor dataloader to use the new model and reduce queries back down 2020-09-20 18:36:19 +03:00
Sulka Haro 0c7e9bf456 * Require created_at for Treatments on insert
* Refactoring the cache: moved to another file and support flushing from bus events
2020-09-19 18:17:20 +03:00
Adam HarrisonandGitHub b1ec21cd3f Added indexes to 'entries' and 'treatments' along with other updates (#5463)
* Added compound indexes for treatments and entries collections. Updated ensureIndex to createIndex in mongo-strage.js as ensureIndex has been deprecated. Finally, updated testing/populate.js to be compatible with more recent versions of the node driver, as well as fixing a path issue.

* Fixed missing end quote in lib/server/treatments.js. Changed all newly added double quotes to single quote to match style guide.

* Removed indexes that referenced key600.
2020-02-05 08:27:56 +02:00
JakobandSulka Haro 7dc292e056 Resolve unnecessary uses of eslint-ignore (#5436)
* Resolve unnecessary disabling of no-undef eslint rule

* Resolve unnecessary disabling of no-prototype-builtins eslint rule

* Resolve unnecessary disabling of no-unused-vars eslint rule

* Resolve unnecessary disabling of no-empty eslint rule
2020-01-12 20:13:29 +00:00
Sulka Haro 851b08ff4c Fix issues found with linting in the server code & update module versions based on npm audit 2019-07-19 09:46:40 +03:00
Sulka HaroandGitHub b04476e1f9 Normalize Treatment, Entry and Device Status object dates to be all in UTC Strings (#4658)
* Normalize Treatment object dates to be all in UTC Strings, as expected by the codebase

* Also normalize the device status data

* Sort the results so results with mixed dates are returned in correct order

* Use MomentJS to correctly parse the offsets & output the offset to objects at all times

* Removing a debug console log message causing excessive logging

* Use UTC date values for queries even if client asks for zoned dates

* Remove extra sorting based on date. Code clarifications

* * Add missing parseZone() call to treatments
* Check isValid() date on entries

* Use isValid() to check date validity for device status data
2019-07-17 09:03:39 +03:00
Jeremy Cunningham 440807ef89 Reload data when entries or treatments are deleted 2018-12-07 17:40:04 -06:00
Jeremy Cunningham b44890606b Remove unused function. 2018-12-07 17:40:04 -06:00
Jeremy Cunningham 759dd40dec Add clean treatments admin tool. 2018-12-07 17:39:11 -06:00
Jeremy Cunningham 630114ecb9 Use new objId in api call 2018-11-20 21:57:51 -06:00
Jeremy Cunningham 3d6fd3552b Fix devicestatus ObjectID usage. 2018-11-20 21:53:25 -06:00
Jeremy Cunningham a13d8ff5e9 Add treatments delete id debug. 2018-11-20 21:17:11 -06:00
Sulka Haro 051576056a Moved server-specific sources to their own folder. Removed some unused code as per Codacy reports 2017-12-28 19:15:52 +02:00