Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Litestream.replicate_process for systemd #32

Merged

Conversation

rossta
Copy link
Contributor

@rossta rossta commented Jul 1, 2024

When I try to run Litestream.replicate_process, as in mounting the web ui, in production with systemd, I see the following error:

Date::Error: invalid date
    lib/litestream.rb:88:in `strptime'
    lib/litestream.rb:88:in `block in replicate_process'
    lib/litestream.rb:78:in `each'
    lib/litestream.rb:78:in `replicate_process'

The line splitting logic did not appear to work in my environment nor for the example output displayed in the comments of the replicate_process method.

This PR adds basic proof-of-concept tests for both variations of replicate_process and adds a fix for the DateTime parsing logic with systemd. In fixing that issue, I also encountered a bug in the status parsing logic for systemd which is also now addressed using a regex with a named capture group.

Also adds basic proof-of-concept tests for both variations of
Litestream.replicate_process
@rossta rossta force-pushed the fix/litestream-replicate-process branch from 43655c6 to 79835fb Compare July 1, 2024 15:40
@fractaledmind fractaledmind merged commit 49c594a into fractaledmind:main Aug 19, 2024
10 checks passed
@fractaledmind
Copy link
Owner

Released as v0.10.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants