Skip to content
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

xxljob清理日志任务异常JobLogFileCleanThread、gluesource #3418

Open
hello-piper opened this issue Apr 7, 2024 · 1 comment
Open

Comments

@hello-piper
Copy link

xxljob在执行清理任务的时候异常

Which version of XXL-JOB do you using?

2.3.0

Expected behavior

期望能够清理日志

Actual behavior

Unparseable date: "stats-service"
java.text.ParseException: Unparseable date: "stats-service"
at java.base/java.text.DateFormat.parse(DateFormat.java:399)
at com.xxl.job.core.thread.JobLogFileCleanThread$1.run(JobLogFileCleanThread.java:69)
at java.base/java.lang.Thread.run(Thread.java:833)

Steps to reproduce the behavior

spring配置

xxl-job 分布式定时任务

xxl:
job:
admin:
addresses: http://...
accessToken:
executor:
appname: ${spring.application.name}
address:
ip:
port: 9999
logpath: logs/xxljob
logretentiondays: 10
按照这样配置,实际上在目录中有两个文件夹(2024-04-07 gluesource)
try {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
logFileCreateDate = simpleDateFormat.parse(childFile.getName());
} catch (ParseException var11) {
JobLogFileCleanThread.logger.error(var11.getMessage(), var11);
}
怀疑是第二个gluesource转为时间类型异常了

Other information

@syshenyao
Copy link

这个"stats-service"文件名称不对,要日期格式

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

No branches or pull requests

2 participants