sync: 对齐小程序 v1.0.2 生产代码并脱敏

This commit is contained in:
MiFaZhan
2026-10-29 15:15:12 +08:00
parent a7abd476f0
commit 5fcf74deb0
423 changed files with 15001 additions and 6382 deletions
@@ -21,7 +21,7 @@ func appWorkerBatchAsyncEnabled(ctx context.Context) bool {
return g.Cfg().MustGet(ctx, "workerBatchAsync.enabled", false).Bool()
}
func (s *sAppCard) publishWorkerBatchExecute(ctx context.Context, batchNo string, batchType int) error {
func (s *sAppCard) publishWorkerBatchExecute(ctx context.Context, batchNo string, batchType int, requirePublication ...bool) error {
if strings.TrimSpace(batchNo) == "" {
return gerror.New("批次号不能为空")
}
@@ -39,7 +39,7 @@ func (s *sAppCard) publishWorkerBatchExecute(ctx context.Context, batchNo string
})
if err != nil {
g.Log().Errorf(ctx, "投递 worker 批次失败, queue:%s, batchNo:%s, batchType:%d, err:%+v", queueName, batchNo, batchType, err)
if g.Cfg().MustGet(ctx, "workerBatchAsync.failOnPublish", true).Bool() {
if (len(requirePublication) > 0 && requirePublication[0]) || g.Cfg().MustGet(ctx, "workerBatchAsync.failOnPublish", true).Bool() {
return gerror.Wrap(err, "批次已创建但投递 worker 失败")
}
return nil