You've already forked RekomenciBackend
add pipline
This commit is contained in:
@@ -10,6 +10,7 @@ from template_project.application.resume.entity import (
|
||||
ResumeId,
|
||||
ResumeProject,
|
||||
)
|
||||
from template_project.application.resume.interactors.resume_embedding import ResumeEmbeddingInteractor
|
||||
|
||||
|
||||
@to_data_structure
|
||||
@@ -37,6 +38,8 @@ class ProjectInput:
|
||||
class AddResumeInteractor:
|
||||
unit_of_work: UnitOfWork
|
||||
identity_provider: IdentityProvider
|
||||
# TODO: переделать в фоновую таску
|
||||
resume_embedding_interactor: ResumeEmbeddingInteractor
|
||||
|
||||
async def execute(
|
||||
self,
|
||||
@@ -94,6 +97,8 @@ class AddResumeInteractor:
|
||||
)
|
||||
await self.unit_of_work.add(resume_project)
|
||||
|
||||
await self.resume_embedding_interactor.run(resume)
|
||||
|
||||
await self.unit_of_work.commit()
|
||||
|
||||
return resume.id
|
||||
|
||||
Reference in New Issue
Block a user