Skip to content

Commit

Permalink
fix: cleaner panic
Browse files Browse the repository at this point in the history
Signed-off-by: closetool <[email protected]>
  • Loading branch information
kilosonc committed Jul 18, 2023
1 parent 93189bb commit 4dcac0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/jobs/clean/cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (c *Cleaner) eventNeedClean(ctx context.Context, event *models.Event, curre
continue
}
m := make(map[string]interface{})
if event.Extra != nil && *event.Extra != "" {
if event.EventType == models.ClusterKubernetesEvent && event.Extra != nil && *event.Extra != "" {
err := json.Unmarshal([]byte(*event.Extra), &m)
if err != nil {
log.Errorf(ctx, "failed to unmarshal event extra: %v", err)
Expand Down

0 comments on commit 4dcac0a

Please sign in to comment.