mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-02-06 09:54:48 +01:00
refactor use the logger system
This commit is contained in:
parent
44f0f2d3fb
commit
1afe4c69db
@ -53,8 +53,8 @@ func (p *Poller) poll(ctx context.Context, wg *sync.WaitGroup, limiter *rate.Lim
|
|||||||
func (p *Poller) pollTaskWithRateLimit(ctx context.Context, limiter *rate.Limiter) {
|
func (p *Poller) pollTaskWithRateLimit(ctx context.Context, limiter *rate.Limiter) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
// we don't know whether log will panic, so just use fmt
|
err := fmt.Errorf("panic: %v", r)
|
||||||
fmt.Printf("panic: %v\n", r)
|
log.WithError(err).Error("panic in pollTaskWithRateLimit")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user