forked from TencentBlueKing/bk-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Job任务支持故障转移 TencentBlueKing#1563
- Loading branch information
1 parent
9659fdf
commit 691aa8f
Showing
12 changed files
with
333 additions
and
29 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt
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,21 @@ | ||
package com.tencent.bkrepo.job.batch.base | ||
|
||
/** | ||
* 支持故障转移的job | ||
* */ | ||
interface FailoverJob { | ||
/** | ||
* 故障转移 | ||
* */ | ||
fun failover() | ||
|
||
/** | ||
* 是否发生故障转移 | ||
* */ | ||
fun isFailover(): Boolean | ||
|
||
/** | ||
* 恢复现场 | ||
*/ | ||
fun recover() | ||
} |
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.