-
Notifications
You must be signed in to change notification settings - Fork 41
Move tasks db to filesystem #596
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
Conversation
from lab.task import Task as TaskService | ||
|
||
|
||
class TasksService: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to make these async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to preserve the DB pattern where those functions were async so I dont break anything in those terms. I understand we wanted to remove async awaits so I could get rid of the async part by looking at the usage in different places if you prefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better if we don't make things async if they don't need it. It might beneift us down the road too (in the past we had to have multiple versions of somethings).
"""Service for managing tasks using filesystem storage""" | ||
|
||
def __init__(self): | ||
self.task_service = TaskService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not asking for a change but I don't totally understand what the benefit of wrapping this in a class and making a singleton is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason, I just wanted to structure these better so I started with the tasks one and thought I'd keep adding similar things for the other services. I can remove that singleton from init if that is more preferable
…sformerlab/transformerlab-api into move/tasks-db-to-filesystem
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Depends on transformerlab/transformerlab-sdk#19