-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : 新增任务超时时间控制 以及 bug fix #77
Open
marunrun
wants to merge
13
commits into
xxl-job:master
Choose a base branch
from
marunrun:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
增加executor.ctx executor.cancel 控制执行器的退出, 并增加执行器退出等待时间 执行器退出之后 不需要再重复注册执行器了 增加ctx.Done()监听 执行超时之后 主动回调 修复同时执行同名任务, 共用一个task指针会任务回调的错误
- 新增 backoff 包,实现指数退避算法 - 在 callback 函数中集成退避重试逻辑 - 优化 callback 函数,处理网络请求和错误 - 更新 executor.go,引入 backoff包和相关配置 (cherry picked from commit 9060125f83933be5260a941c4ed7621ca4c6d5f7)
- 在 FileLogger 中添加 readLog 方法,用于从指定行号开始读取日志 - 新增 LogResContent 结构体用于存储读取的日志信息- 实现日志读取错误处理和文件不存在时的逻辑- 优化日志处理性能,使用缓冲读取器逐行读取日志 - 新增 FileLogHandler 函数用于处理日志请求 - 更新示例中的日志处理注册方式 (cherry picked from commit 3dc41340670f8c9ca93d4114a85f1653207eb67d)
- 实现了 RotateLog 函数,用于定期清理超过指定天数的日志目录 - 添加了 log_test.go 文件,编写了 TestRotateLog测试用例 - 优化了日志目录的获取逻辑,使用常量 dirDateLayout 统一日期格式 (cherry picked from commit ab2a8aaa2734ed1032d2da90f68c54ebc4310086)
…象创建过程 - 在示例项目中添加日志轮转功能 - 更新任务处理逻辑,使用新的日志对象 (cherry picked from commit e6ba166ccba6010c8a619a4076009b88dbf78af2)
- 新增 Logf 方法实现日志格式化输出 - 重构 Write 方法,优化日志写入逻辑- 添加多个测试用例,覆盖日志功能的各个方面 -优化 readLog 方法,提高日志读取性能 - 添加并发写入和不同消息大小的性能测试 (cherry picked from commit d21ad67a830bd33ec736ab42882688822dfda77c)
(cherry picked from commit e74a4d2da70b9d5026109647fd6ea02f4bd684ca)
- 在 executor 结构体中添加 ctx 字段,用于统一管理上下文- 在任务执行时使用 executor 的上下文,以便于任务管理和取消 - 修改任务取消逻辑,成功取消任务后返回成功状态码- 添加上下文测试,验证上下文取消功能 - 调整测试任务的睡眠时间,以方便测试任务取消功能 (cherry picked from commit 360874be367e5a4f48daf2f941a9b5d376f68028)
- 优化 ReadFile 函数中的读取逻辑,提高日志读取效率 - 注释掉 executor.go 中的请求参数日志输出,减少冗余日志 (cherry picked from commit bbf7a05326f4d8ba43dc5d733a48f0217cd5f556)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
增加executor.ctx executor.cancel 控制执行器的退出, 并增加执行器退出等待时间
执行器退出之后 不需要再重复注册执行器了
增加ctx.Done()监听 执行超时之后 主动回调
修复同时执行同名任务, 共用一个task指针会任务回调的错误