|
|
|
|
@ -95,19 +95,16 @@ func (j *sessionCleanupJob) Run(ctx context.Context) error {
|
|
|
|
|
return errors.Wrap(ctx, err, op)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if len(results) < 1 {
|
|
|
|
|
} else {
|
|
|
|
|
for _, result := range results {
|
|
|
|
|
event.WriteError(ctx, op, stderrors.New("worker has not reported status within acceptable grace period, all connections closed"),
|
|
|
|
|
event.WithInfo(
|
|
|
|
|
"private_id", result.ServerId,
|
|
|
|
|
"update_time", result.LastUpdateTime,
|
|
|
|
|
"grace_period_seconds", j.gracePeriod,
|
|
|
|
|
"number_connections_closed", result.NumberConnectionsClosed,
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
j.totalClosed += result.NumberConnectionsClosed
|
|
|
|
|
}
|
|
|
|
|
for _, result := range results {
|
|
|
|
|
event.WriteError(ctx, op, stderrors.New("worker has not reported status within acceptable grace period, all connections closed"),
|
|
|
|
|
event.WithInfo(
|
|
|
|
|
"private_id", result.ServerId,
|
|
|
|
|
"update_time", result.LastUpdateTime,
|
|
|
|
|
"grace_period_seconds", j.gracePeriod,
|
|
|
|
|
"number_connections_closed", result.NumberConnectionsClosed,
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
j.totalClosed += result.NumberConnectionsClosed
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|