Skip to content

Commit

Permalink
align sfv naming
Browse files Browse the repository at this point in the history
  • Loading branch information
williamsjokvist committed Oct 12, 2024
1 parent 9f2f2b4 commit 8cfe67c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/tracker/sfv/track.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (t *SFVTracker) stopFn(ctx context.Context) {
}

// Start will update the MatchHistory when new matches are played.
func (t *SFVTracker) InitFn(ctx context.Context, cfn string, restoreData bool) (*model.Session, error) {
func (t *SFVTracker) Init(ctx context.Context, cfn string, restore bool) (*model.Session, error) {
// safe guard
if t.isTracking {
return nil, errors.New("tracking is already in progress")
Expand Down Expand Up @@ -95,12 +95,12 @@ func (t *SFVTracker) InitFn(ctx context.Context, cfn string, restoreData bool) (

pollCtx, cancel := context.WithCancel(ctx)
t.stopTracking = cancel
go t.PollFn(pollCtx, cfn, 30*time.Second)
go t.Poll(pollCtx, cfn, 30*time.Second)

return nil, nil
}

func (t *SFVTracker) PollFn(ctx context.Context, cfn string, refreshInterval time.Duration) {
func (t *SFVTracker) Poll(ctx context.Context, cfn string, refreshInterval time.Duration) {
for {
didBreak := utils.SleepOrBreak(refreshInterval, func() bool {
select {
Expand Down

0 comments on commit 8cfe67c

Please sign in to comment.