Skip to content

Commit

Permalink
do refresh token in startup sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed Jun 3, 2021
1 parent e9899f3 commit b2f5dcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func (m *Manager) Loop(ctx context.Context) error {
tokenRefreshTicker := time.NewTicker(TargetTokenInterval)
defer tokenRefreshTicker.Stop()

if err := m.doTargetToken(ctx); err != nil {
logger.Logf(false, "failed to refresh token in initialize: %+v", err)
}

for {
select {
case <-tokenRefreshTicker.C:
Expand Down

0 comments on commit b2f5dcf

Please sign in to comment.