fix: wrong timestamps on guild join#50
Open
busybox11 wants to merge 3 commits intodumpus-app:mainfrom
Open
Conversation
fixes parsing of guild_joined events which are using floats representing unix timestamps
less duplicated code, simpler logic
fixes the following error: Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster" should probably implement the necessary changes for pg18 instead but i did not put much effort into setting the devserver. making it work at all was my priority, to make sure i had everything working as intended
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the guild_joined event was not represented internally by the same timestamp instance as the rest of the events - they are represented by floats, which have 4 less digits than expected, leading to the date being interpreted in 1970.
this PR implements handling of those timestamps in the common util functions rather than at the event level, reducing the potential similar errors from other events along the way.
python not having types makes this hard to troubleshoot. i wasn't expecting to go very deep on this specific issue, so this PR works and will definitely help, but i believe that more changes on the parsing side could come in handy towards making parsing accurate and stable.
this PR also fixes the compose definition failing on initial install because of a postgres 18 change. i pinned the container to v17 so that it doesn't complain and endlessly restart. not the most ideal solution, but it works (see commit desc)