Skip to content

Conversation

@yuhan0501
Copy link

What is the purpose of the change

#898
在重跑实例的时候,TaskContext 能够获取到这个实例首次被触发的时间。

Brief changelog

1.TaskContext 新增expectTriggerTime字段
2.修改其余各处需要给 TaskContext 赋值的地方

Verifying this change

已经自测通过:
image

Do I need to test?
Has testing been completed?
已经完成测试
Test method?
1.运行一个任务
2.在实例列表重新运行这个实例
3.观察收到的expectTriggerTime是否为首次任务运行的时间

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 3 checklist before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Follow the git commit specification
    • feat: xxx -> The feat type is used to identify production changes related to new backward-compatible abilities or functionality.
    • perf: xxx -> The perf type is used to identify production changes related to backward-compatible performance improvements.
    • fix: xxx -> The fix type is used to identify production changes related to backward-compatible bug fixes.
    • docs: xxx -> The docs type is used to identify documentation changes related to the project - whether intended externally for the end users (in case of a library) or internally for the developers.
    • test: xxx -> The test type is used to identify development changes related to tests - such as refactoring existing tests or adding new tests.
    • refactor: xxx -> The refactor type is used to identify development changes related to modifying the codebase, which neither adds a feature nor fixes a bug - such as removing redundant code, simplifying the code, renaming variables, etc.

@KFCFans
Copy link
Member

KFCFans commented Aug 17, 2025

image

这个改动会有预期外的影响,DB的expectTriggerTime还承载了高可用检查以及后面调度延迟计算的一系列功能,不能直接修改。

理论上数据库表得加一个 meta 字段,把一些固定的调度信息都放进去,不承担具体职责,就可以随便透传了。

@KFCFans KFCFans merged commit f588d0f into PowerJob:master Aug 17, 2025
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