(ctx context.Context, repoType types.RepositoryType, repoID, userID int64, deployID int64)
| 248 | } |
| 249 | |
| 250 | func (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 | |
| 260 | func (s *DeployTaskStore) GetServerlessDeployByRepID(ctx context.Context, repoID int64) (*Deploy, error) { |
| 261 | deploy := &Deploy{} |
no test coverage detected