Skip to content

Commit

Permalink
Merge pull request #1590 from memphisdev/bugfix-RND-408-remove-statio…
Browse files Browse the repository at this point in the history
…n-with-attached-function-actually-not-deleted

bugfix-RND-408-remove-station-with-attached-function-actually-not-deleted
  • Loading branch information
shohamroditimemphis authored Jan 2, 2024
2 parents 197cf99 + 0795f96 commit 8b280cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@ func DeleteStationsByNames(stationNames []string, tenantName string) error {
if tenantName != conf.GlobalAccount {
tenantName = strings.ToLower(tenantName)
}
_, err = conn.Conn().Query(ctx, stmt.Name, stationNames, tenantName)
_, err = conn.Conn().Exec(ctx, stmt.Name, stationNames, tenantName)
if err != nil {
return err
}
Expand Down
4 changes: 4 additions & 0 deletions db/db_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ func DeleteAllTestEvents(tenantName string) error {
func DeleteScheduledFunctionWorkersByTenant(tenantName string) error {
return nil
}

func DeleteScheduledFunctionWorkersByStationId(stationId int, tenantName string) error {
return nil
}
5 changes: 5 additions & 0 deletions server/memphis_handlers_stations.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ func removeStationResources(s *Server, station models.Station, shouldDeleteStrea
return err
}

err = db.DeleteScheduledFunctionWorkersByStationId(station.ID, station.TenantName)
if err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 8b280cc

Please sign in to comment.