update worker auth rotate (#2484)
This commit is contained in:
1 parent
f6532c6cd6
commit
bd4f5f3801
1 file changed
+2
-1
@@ -93,7 +93,7 @@ func (w *Worker) startAuthRotationTicking(cancelCtx context.Context) {
|
||||
shouldRotate = true
|
||||
default:
|
||||
delta := latestValid.Sub(earliestValid)
|
||||
shouldRotate = now.Before(earliestValid.Add(delta / 2))
|
||||
shouldRotate = now.After(earliestValid.Add(delta / 2))
|
||||
}
|
||||
|
||||
if !shouldRotate {
|
||||
@@ -104,6 +104,7 @@ func (w *Worker) startAuthRotationTicking(cancelCtx context.Context) {
|
||||
event.WriteError(cancelCtx, op, err)
|
||||
continue
|
||||
}
|
||||
event.WriteSysEvent(cancelCtx, op, "worker credentials rotated")
|
||||
|
||||
// TODO (maybe): Calculate new delta and set a custom retry time on the timer?
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user