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 task collection with sqlite #673

Merged
merged 7 commits into from
May 9, 2023
Merged

Fix task collection with sqlite #673

merged 7 commits into from
May 9, 2023

Conversation

tcompa
Copy link
Collaborator

@tcompa tcompa commented May 9, 2023

Close #661 (again)

@github-actions
Copy link

github-actions bot commented May 9, 2023

Coverage report

The coverage rate went from 86.9% to 86.92% ⬆️
The branch rate is 75%.

100% of new lines are covered.

Diff Coverage details (click to unfold)

fractal_server/app/api/v1/task.py

100% of new lines are covered (77.21% of the complete file).

fractal_server/init.py

100% of new lines are covered (100% of the complete file).

@tcompa
Copy link
Collaborator Author

tcompa commented May 9, 2023

For the record:

With #664, we tried to be very general and support background tasks with some flexibility (that is, they could use either sync or async db session). For some unclear reason, we were relying on async sessions for task-collection and on sync session for workflow execution.

With this PR we simplify things a bit, and we switch to always using sync DB sessions in background tasks, which has never lead to errors.

@tcompa tcompa marked this pull request as ready for review May 9, 2023 10:37
@tcompa tcompa merged commit e3accbb into main May 9, 2023
@tcompa tcompa deleted the fix_sqlite_task_collection branch May 9, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task collection broken with sqlite?
1 participant