This is an automated email from the ASF dual-hosted git repository. DImuthuUpe pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
commit 9b7c6e5440bd12b4df12c3a3e4e94f865f08a181 Author: DImuthuUpe <[email protected]> AuthorDate: Mon May 18 08:56:52 2026 -0400 Fixing minor misconfiguration --- .../internal/subscribers/account.go | 20 ++++++++++---------- .../internal/subscribers/subscriber.go | 6 +++--- pkg/service/compute_cluster.go | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/connectors/SLURM/Association-Mapper/internal/subscribers/account.go b/connectors/SLURM/Association-Mapper/internal/subscribers/account.go index a4a41f99c..2b872d54c 100644 --- a/connectors/SLURM/Association-Mapper/internal/subscribers/account.go +++ b/connectors/SLURM/Association-Mapper/internal/subscribers/account.go @@ -10,33 +10,33 @@ import ( "github.com/apache/airavata-custos/pkg/models" ) -func (a *AssociationSubscriber) SubscribeToComputeAccountCreation(computeAccount models.ComputeAllocation) { - slog.Info("Received compute account creation event", "account", computeAccount) +func (a *AssociationSubscriber) SubscribeToComputeAllocationCreation(computeAccount models.ComputeAllocation) { + slog.Info("Received compute allocation creation event", "account", computeAccount) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() cluster, err := a.coreService.GetComputeCluster(ctx, computeAccount.ComputeClusterID) if err != nil { - slog.Error("Failed to get compute cluster for account creation", "error", err) + slog.Error("Failed to get compute cluster for allocation creation", "error", err) return } project, err := a.coreService.GetProject(ctx, computeAccount.ProjectID) if err != nil { - slog.Error("Failed to get project for account creation", "error", err) + slog.Error("Failed to get project for allocation creation", "error", err) return } pi, err := a.coreService.GetUser(ctx, project.ProjectPIID) if err != nil { - slog.Error("Failed to get project PI for account creation", "error", err) + slog.Error("Failed to get project PI for allocation creation", "error", err) return } organization, err := a.coreService.GetOrganization(ctx, pi.OrganizationID) if err != nil { - slog.Error("Failed to get organization for account creation", "error", err) + slog.Error("Failed to get organization for allocation creation", "error", err) return } @@ -52,10 +52,10 @@ func (a *AssociationSubscriber) SubscribeToComputeAccountCreation(computeAccount } } -func (a *AssociationSubscriber) SubscribeToComputeAccountDeletion(computeAccount models.ComputeAllocation) { - slog.Info("Received compute account deletion event", "account", computeAccount) +func (a *AssociationSubscriber) SubscribeToComputeAllocationDeletion(computeAccount models.ComputeAllocation) { + slog.Info("Received compute allocation deletion event", "account", computeAccount) } -func (a *AssociationSubscriber) SubscribeToComputeAccountUpdate(computeAccount models.ComputeAllocation) { - slog.Info("Received compute account update event", "account", computeAccount) +func (a *AssociationSubscriber) SubscribeToComputeAllocationUpdate(computeAccount models.ComputeAllocation) { + slog.Info("Received compute allocation update event", "account", computeAccount) } diff --git a/connectors/SLURM/Association-Mapper/internal/subscribers/subscriber.go b/connectors/SLURM/Association-Mapper/internal/subscribers/subscriber.go index 30b03f9af..ce5161fd7 100644 --- a/connectors/SLURM/Association-Mapper/internal/subscribers/subscriber.go +++ b/connectors/SLURM/Association-Mapper/internal/subscribers/subscriber.go @@ -19,7 +19,7 @@ func NewAssociationSubscriber(slurmClient *client.Client, eventBus *events.Bus, } func (a *AssociationSubscriber) RegisterSubscribers() { - a.eventBus.SubscribeComputeAllocationCreated(a.SubscribeToComputeAccountCreation) - a.eventBus.SubscribeComputeAllocationDeleted(a.SubscribeToComputeAccountDeletion) - a.eventBus.SubscribeComputeAllocationUpdated(a.SubscribeToComputeAccountUpdate) + a.eventBus.SubscribeComputeAllocationCreated(a.SubscribeToComputeAllocationCreation) + a.eventBus.SubscribeComputeAllocationDeleted(a.SubscribeToComputeAllocationDeletion) + a.eventBus.SubscribeComputeAllocationUpdated(a.SubscribeToComputeAllocationUpdate) } diff --git a/pkg/service/compute_cluster.go b/pkg/service/compute_cluster.go index 41198709b..a9d5b3091 100644 --- a/pkg/service/compute_cluster.go +++ b/pkg/service/compute_cluster.go @@ -51,7 +51,7 @@ func (s *Service) CreateComputeCluster(ctx context.Context, cluster *models.Comp return nil, fmt.Errorf("create compute cluster: %w", err) } - s.eventBus.Publish(events.ComputeAllocationCreateEvent, cluster) + s.eventBus.Publish(events.ComputeClusterCreateEvent, cluster) return cluster, nil } @@ -103,7 +103,7 @@ func (s *Service) UpdateComputeCluster(ctx context.Context, cluster *models.Comp return fmt.Errorf("update compute cluster: %w", err) } - s.eventBus.Publish(events.ComputeAllocationUpdateEvent, cluster) + s.eventBus.Publish(events.ComputeClusterUpdateEvent, cluster) return nil } @@ -125,6 +125,6 @@ func (s *Service) DeleteComputeCluster(ctx context.Context, id string) error { return fmt.Errorf("delete compute cluster: %w", err) } - s.eventBus.Publish(events.ComputeAllocationDeleteEvent, cluster) + s.eventBus.Publish(events.ComputeClusterDeleteEvent, cluster) return nil }
