forked from TrueCloudLab/frostfs-node
[#1043] control: Add ResetEvacuationStatus implementation
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
926cdeb072
commit
31e2396a5f
8 changed files with 1254 additions and 705 deletions
|
@ -204,3 +204,18 @@ func (l *evacuationLimiter) CancelIfRunning() error {
|
|||
l.cancel()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *evacuationLimiter) ResetEvacuationStatus() error {
|
||||
l.guard.Lock()
|
||||
defer l.guard.Unlock()
|
||||
|
||||
if l.state.processState == EvacuateProcessStateRunning {
|
||||
return logicerr.New("there is running evacuation task")
|
||||
}
|
||||
|
||||
l.state = EvacuationState{}
|
||||
l.eg = nil
|
||||
l.cancel = nil
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue