Skip to content

Commit

Permalink
compute next trigger time
Browse files Browse the repository at this point in the history
  • Loading branch information
ponfee committed Aug 9, 2024
1 parent 4aab3ff commit a99fe2d
Show file tree
Hide file tree
Showing 24 changed files with 149 additions and 426 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# database configuration
datasource.disjob:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/disjob?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&connectTimeout=2000&socketTimeout=5000&serverTimezone=Asia/Shanghai&failOverReadOnly=false
username: disjob
password: disjob$123456
minimum-idle: 2
maximum-pool-size: 20
connection-timeout: 2000
pool-name: disjob
# database configuration:前面的`disjob.datasource`为固定前缀,后面的`disjob`为数据源名
disjob.datasource:
disjob:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/disjob?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&connectTimeout=2000&socketTimeout=5000&serverTimezone=Asia/Shanghai&failOverReadOnly=false
username: disjob
password: disjob$123456
minimum-idle: 2
maximum-pool-size: 20
connection-timeout: 2000
pool-name: disjob
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public static Date endOfYear(Date date) {
// ----------------------------------------------------------------day of

/**
* 获取指定时间所在周的周n,1<=day<=7
* 获取指定时间所在周的周n:[1, 7]
*
* @param date 相对日期
* @param dayOfWeek 1-星期一;2-星期二;...
Expand All @@ -487,7 +487,7 @@ public static Date withDayOfWeek(Date date, int dayOfWeek) {
}

/**
* 获取指定时间所在月的n号,1<=day<=31
* 获取指定时间所在月的n号:[1, 31]
*
* @param date the date
* @param dayOfMonth the day of month
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public static String getRootCauseStackTrace(Throwable t) {
return ExceptionUtils.getStackTrace(t);
}

public static String getRootCauseStackTrace(Throwable t, int maxLength) {
return StringUtils.truncate(getRootCauseStackTrace(t), maxLength);
}

public static String getRootCauseMessage(Throwable t) {
if (t == null) {
return null;
Expand Down

This file was deleted.

Loading

0 comments on commit a99fe2d

Please sign in to comment.