Fix lightning map layer timestamps#657
Conversation
- converts incoming timestamp from nanoseconds to milliseconds - adjusts displays to use timestamp instead of age - removes the now unused age from strike objects - adjust time limit to a constant 30 minutes to match panel text The memory imposed limit should be on the size of the array, not the age.
|
Good catch — the timestamp handling was definitely broken. Blitzortung sends nanoseconds, so One question before I merge:
Minor style nit (non-blocking): Otherwise LGTM — nice fix. |
|
Just to close the loop then.
Yes, that was intentional as mentioned in the commit message body. The recent activity panel goes to 30 minutes, so this was to match the panel. As the amount of items in the array is more important than their time to control memory bloat, I left the item count trim alone, and adjusted the time to 30 minutes to match the panel.
In that case, |
What does this PR do?
Primarily this updates the Lightning Map Layer to convert the nanosecond timestamp from Blitzortung, to a millisecond timestamp so it's consistent with the rest of the JS, After that it refactors some related code,
Type of change
How to test
Checklist
server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)var(--accent-cyan), etc.).bak,.old,console.logdebug lines, or test scripts includedScreenshots (if visual change)
Before
After