Hexagon / pup

Universal process manager built in Deno
https://pup.56k.guru
MIT License
160 stars 5 forks source link

Fix log order and persisting log lines that exceed Deno's KV limit #46

Closed Leokuma closed 1 year ago

Leokuma commented 1 year ago

KV has a limit of 64KiB per value. When logging lines larger than that, Pup would error and not log into KV. This PR makes Pup split long lines and log them all by adding 1 to the timestamp of each chunk. The timestamp cannot be the same for every chunk because it's used as key. Please let me know what you think of this approach.

Also, this PR guaratees that log messages are stored in order of arrival, per process.

If everything is fine, I can update the CHANGELOG.

Leokuma commented 1 year ago

The error that happened in the tests is because newer Deno versions implement the new TypeScript feature [Symbol.dispose]. It's not related to the changes I made. I didn't want to add too many changes in the same PR.

Hexagon commented 1 year ago

Looking good 👍

Hexagon commented 1 year ago

It's ok to merge this when you're ready👍

Hexagon commented 1 year ago

Released in 1.0.0-rc.12