Skip to content

Comments

fix(broker): 防止内部参数 step 传递给外部系统#44

Merged
mic1on merged 1 commit intomainfrom
refactor/optimize-step-param
Jan 22, 2026
Merged

fix(broker): 防止内部参数 step 传递给外部系统#44
mic1on merged 1 commit intomainfrom
refactor/optimize-step-param

Conversation

@nowanti
Copy link
Collaborator

@nowanti nowanti commented Jan 22, 2026

从 kwargs 中提前移除内部控制参数 step,避免该参数被下游 broker
(如 SQSBroker)传递给外部 API(如 boto3 send_message)导致参数错误。

修复方案:

  • 在 BaseBroker.send 入口处使用 kwargs.pop('step', None) 提取 step
  • 确保 step 仅用于框架内部的 before_emit/after_emit 钩子
  • 统一处理避免各 broker 分别过滤

从 kwargs 中提前移除内部控制参数 step,避免该参数被下游 broker
(如 SQSBroker)传递给外部 API(如 boto3 send_message)导致参数错误。

修复方案:
- 在 BaseBroker.send 入口处使用 kwargs.pop('step', None) 提取 step
- 确保 step 仅用于框架内部的 before_emit/after_emit 钩子
- 统一处理避免各 broker 分别过滤
@nowanti nowanti requested a review from mic1on January 22, 2026 02:31
@mic1on mic1on merged commit fd66650 into main Jan 22, 2026
8 checks passed
@mic1on mic1on deleted the refactor/optimize-step-param branch January 22, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants