Skip to content

Commit 5dd6155

Browse files
committed
Refresh is also an operation
1 parent d1a2508 commit 5dd6155

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

engine/podgroup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ func (pgCtrl *podGroupController) Refresh(force bool) {
297297
if pgCtrl.IsRemoved() || pgCtrl.IsPending() {
298298
return
299299
}
300+
pgCtrl.emitOperationEvent(OperationStart)
300301
pgCtrl.DisableRefresh()
301302
defer func() {
302303
pgCtrl.opsChan <- pgOperOver{}

engine/runtimes.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ type PGOpState int32
1414
var RestartMaxCount int
1515

1616
const (
17-
RunStatePending = iota
18-
RunStateDrift
19-
RunStateSuccess
20-
RunStateExit
21-
RunStateFail
22-
RunStateInconsistent
23-
RunStateMissing
24-
RunStateRemoved
25-
RunStatePaused
26-
RunStateError // call docker interface with error
17+
RunStatePending = iota // waiting for operation
18+
RunStateDrift // drifting from one node to another
19+
RunStateSuccess // ok
20+
RunStateExit // exited
21+
RunStateFail // start failed with error
22+
RunStateInconsistent // container's state is different between deployd and swarm
23+
RunStateMissing // container is missing and need create it. happened when node down .etc
24+
RunStateRemoved // removed
25+
RunStatePaused // paused
26+
RunStateError // call docker interface with error
2727
)
2828

2929
const (

0 commit comments

Comments
 (0)