MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / __call__

Method __call__

app/api/agentops/deploy/views/deploy.py:118–141  ·  view source on GitHub ↗

Update deployment configuration for a project. Updates the HostingProjectModel with the provided values. Only non-None values in the request will be updated.

(
        self,
        project_id: str,
        body: UpdateDeploymentRequest,
        orm: Session = Depends(get_orm_session),
    )

Source from the content-addressed store, hash-verified

116
117class UpdateDeploymentView(BaseDeploymentView):
118 async def __call__(
119 self,
120 project_id: str,
121 body: UpdateDeploymentRequest,
122 orm: Session = Depends(get_orm_session),
123 ) -> StatusResponse:
124 """
125 Update deployment configuration for a project.
126
127 Updates the HostingProjectModel with the provided values.
128 Only non-None values in the request will be updated.
129 """
130 project: HostingProjectModel = await self.get_hosting_project(orm, project_id)
131
132 for field_name, field_value in body.model_dump(exclude_none=True).items():
133 if hasattr(project, field_name):
134 setattr(project, field_name, field_value)
135
136 orm.commit()
137
138 return StatusResponse(
139 success=True,
140 message="Deployment configuration updated successfully",
141 )
142
143
144class InitiateBuildView(BaseDeploymentView):

Callers

nothing calls this directly

Calls 3

StatusResponseClass · 0.90
get_hosting_projectMethod · 0.80
model_dumpMethod · 0.45

Tested by

no test coverage detected