|
|
@ -64,10 +64,17 @@ func (q *delayedStarter) setInternal(atShutdown func(context.Context, func()), h |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
if err.Error() != "resource temporarily unavailable" { |
|
|
|
if err.Error() != "resource temporarily unavailable" { |
|
|
|
|
|
|
|
if bs, ok := q.cfg.([]byte); ok { |
|
|
|
|
|
|
|
log.Warn("[Attempt: %d] Failed to create queue: %v for %s cfg: %s error: %v", i, q.underlying, q.name, string(bs), err) |
|
|
|
|
|
|
|
} else { |
|
|
|
log.Warn("[Attempt: %d] Failed to create queue: %v for %s cfg: %#v error: %v", i, q.underlying, q.name, q.cfg, err) |
|
|
|
log.Warn("[Attempt: %d] Failed to create queue: %v for %s cfg: %#v error: %v", i, q.underlying, q.name, q.cfg, err) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
i++ |
|
|
|
i++ |
|
|
|
if q.maxAttempts > 0 && i > q.maxAttempts { |
|
|
|
if q.maxAttempts > 0 && i > q.maxAttempts { |
|
|
|
|
|
|
|
if bs, ok := q.cfg.([]byte); ok { |
|
|
|
|
|
|
|
return fmt.Errorf("Unable to create queue %v for %s with cfg %s by max attempts: error: %v", q.underlying, q.name, string(bs), err) |
|
|
|
|
|
|
|
} |
|
|
|
return fmt.Errorf("Unable to create queue %v for %s with cfg %#v by max attempts: error: %v", q.underlying, q.name, q.cfg, err) |
|
|
|
return fmt.Errorf("Unable to create queue %v for %s with cfg %#v by max attempts: error: %v", q.underlying, q.name, q.cfg, err) |
|
|
|
} |
|
|
|
} |
|
|
|
sleepTime := 100 * time.Millisecond |
|
|
|
sleepTime := 100 * time.Millisecond |
|
|
|