Skip to content

Commit

Permalink
Update manager.go
Browse files Browse the repository at this point in the history
fix ActorManagerContext DeactivateActor
  • Loading branch information
wXwcoder authored Feb 19, 2024
1 parent b787952 commit 2bc9b71
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions actor/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ func (m *DefaultActorManagerContext) InvokeMethod(ctx context.Context, actorID,
return rspData, actorErr.Success
}

// DeactivateActor removes actor from actor manager.
func (m *DefaultActorManager) DeactivateActor(actorID string) actorErr.ActorErr {
func (m *DefaultActorManagerContext) DeactivateActor(_ context.Context, actorID string) actorErr.ActorErr {
actor, ok := m.activeActors.Load(actorID)
if !ok {
return actorErr.ErrActorIDNotFound
Expand All @@ -175,15 +174,6 @@ func (m *DefaultActorManager) DeactivateActor(actorID string) actorErr.ActorErr
return actorErr.Success
}

func (m *DefaultActorManagerContext) DeactivateActor(_ context.Context, actorID string) actorErr.ActorErr {
_, ok := m.activeActors.Load(actorID)
if !ok {
return actorErr.ErrActorIDNotFound
}
m.activeActors.Delete(actorID)
return actorErr.Success
}

// InvokeReminder invoke reminder function with given params.
func (m *DefaultActorManagerContext) InvokeReminder(ctx context.Context, actorID, reminderName string, params []byte) actorErr.ActorErr {
if m.factory == nil {
Expand Down

0 comments on commit 2bc9b71

Please sign in to comment.