Skip to content

Commit

Permalink
Merge pull request #62 from whywaita/fix/update-token-on-startup
Browse files Browse the repository at this point in the history
do refresh token in startup sequence
  • Loading branch information
whywaita authored Jun 3, 2021
2 parents e9899f3 + b2f5dcf commit c3d052f
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 c3d052f

Please sign in to comment.