MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / StopDeploy

Method StopDeploy

builder/store/database/deploy_task.go:250–258  ·  view source on GitHub ↗
(ctx context.Context, repoType types.RepositoryType, repoID, userID int64, deployID int64)

Source from the content-addressed store, hash-verified

248}
249
250func (s *DeployTaskStore) StopDeploy(ctx context.Context, repoType types.RepositoryType, repoID, userID int64, deployID int64) error {
251 // only stop the deploy of specific repo was triggered by current login user
252 res, err := s.db.BunDB.Exec("Update deploys set status=?,updated_at=current_timestamp where id = ? and repo_id = ? and user_id = ?", common.Stopped, deployID, repoID, userID)
253 if err != nil {
254 return err
255 }
256 err = assertAffectedOneRow(res, err)
257 return err
258}
259
260func (s *DeployTaskStore) GetServerlessDeployByRepID(ctx context.Context, repoID int64) (*Deploy, error) {
261 deploy := &Deploy{}

Callers 2

StopMethod · 0.80
DeployStopMethod · 0.80

Calls 1

assertAffectedOneRowFunction · 0.85

Tested by

no test coverage detected