Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from stelin/1.x
Add alarm
- Loading branch information
Showing
120 changed files
with
2,549 additions
and
169 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
openjob-common/src/main/java/io/openjob/common/constant/FailStatusEnum.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.openjob.common.constant; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* @author stelin swoft@qq.com | ||
* @since 1.0.6 | ||
*/ | ||
@Getter | ||
@AllArgsConstructor | ||
public enum FailStatusEnum { | ||
|
||
/** | ||
* Job or delay | ||
*/ | ||
NONE(0, "None"), | ||
|
||
/** | ||
* Job or delay | ||
*/ | ||
EXECUTE_FAIL(1, "Execute fail"), | ||
|
||
/** | ||
* Job or delay | ||
*/ | ||
EXECUTE_TIMEOUT(5, "Execute timeout"), | ||
|
||
/** | ||
* Job | ||
*/ | ||
EXECUTE_DISCARD(10, "Execute discard"), | ||
|
||
/** | ||
* Job | ||
*/ | ||
EXECUTE_RETRY_TIMES(15, "Execute retry times"), | ||
|
||
/** | ||
* Delay | ||
*/ | ||
EXECUTE_IGNORE(20, "Execute ignore"), | ||
; | ||
|
||
private final Integer status; | ||
private final String message; | ||
|
||
public static Boolean isExecuteFail(Integer status) { | ||
return EXECUTE_FAIL.getStatus().equals(status); | ||
} | ||
|
||
public static Boolean isExecuteTimeout(Integer status) { | ||
return EXECUTE_TIMEOUT.getStatus().equals(status); | ||
} | ||
} |
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
27 changes: 27 additions & 0 deletions
27
openjob-common/src/main/java/io/openjob/common/constant/JobInstanceStopEnum.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.openjob.common.constant; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* @author stelin swoft@qq.com | ||
* @since 1.0.6 | ||
*/ | ||
@AllArgsConstructor | ||
@Getter | ||
public enum JobInstanceStopEnum { | ||
NORMAL(1, "Normal stop"), | ||
TIMEOUT(2, "Timeout stop"), | ||
; | ||
|
||
private final Integer type; | ||
private final String message; | ||
|
||
public static Boolean isNormal(Integer type) { | ||
return NORMAL.getType().equals(type); | ||
} | ||
|
||
public static Boolean isTimeout(Integer type) { | ||
return TIMEOUT.getType().equals(type); | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.