Skip to content

Conversation

deep1401
Copy link
Contributor

@deep1401 deep1401 commented Oct 2, 2025

from lab.task import Task as TaskService


class TasksService:
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link

codecov bot commented Oct 6, 2025

@deep1401 deep1401 merged commit d5ca207 into main Oct 6, 2025
7 of 8 checks passed
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