lucafaggianelli / plombery

Python task scheduler with a user-friendly web UI
http://lucafaggianelli.com/plombery/
MIT License
328 stars 47 forks source link

Fix connection with non sqlite db #392

Closed PierrickBrun closed 3 months ago

PierrickBrun commented 6 months ago

Fix https://github.com/lucafaggianelli/plombery/issues/363

This MR allows to connect to non-sqlite databases.

I ran the tests after the modification and they all passed.

I also ran the tests on an empty postgresql DB and they all passed except tests/test_logging.py::test_pipeline_logs_are_correclty_captured. All the logs appear in double, but the tasks are not doubled in the db.

The logs are not duplicated in the example app running on postgres too.

The same problem appears when I use sqlite as a file (opposed to an in-memory db). So I guess we can ignore this problem and consider postgres as working.

samuel-108 commented 4 months ago

Any updates on this?

lucafaggianelli commented 4 months ago

Hey sorry, I've been absent from Plombery for a while, but I'm getting back!

Thanks for the PR, sounds good to me, @PierrickBrun can you just black-format your code so the unittests pass?