功能特性: - 用户端充值记录页面,从使用日志中分离 - 充值记录中的去开发票功能 - 管理员发票管理页面 - 发票申请、处理、邮件通知功能 - 侧边栏菜单更新 - UI优化和控制台清理 - Docker部署配置 - 生产环境安全配置
25 lines
539 B
Go
25 lines
539 B
Go
package common
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"github.com/bytedance/gopkg/util/gopool"
|
|
"math"
|
|
)
|
|
|
|
var relayGoPool gopool.Pool
|
|
|
|
func init() {
|
|
relayGoPool = gopool.NewPool("gopool.RelayPool", math.MaxInt32, gopool.NewConfig())
|
|
relayGoPool.SetPanicHandler(func(ctx context.Context, i interface{}) {
|
|
if stopChan, ok := ctx.Value("stop_chan").(chan bool); ok {
|
|
SafeSendBool(stopChan, true)
|
|
}
|
|
SysError(fmt.Sprintf("panic in gopool.RelayPool: %v", i))
|
|
})
|
|
}
|
|
|
|
func RelayCtxGo(ctx context.Context, f func()) {
|
|
relayGoPool.CtxGo(ctx, f)
|
|
}
|