fix: acp exit not wait for event handler

This commit is contained in:
Samuel N Cui
2023-09-23 00:09:12 +08:00
parent f59f0b81a6
commit d33b0f624b
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -325,6 +325,9 @@ func (a *jobRestoreExecutor) restoreTape(ctx context.Context, device string) (re
}
defer func() {
a.stateLock.Lock()
defer a.stateLock.Unlock()
restoreTape.Status = entity.CopyStatus_SUBMITED
for _, file := range restoreTape.Files {
if file.Status == entity.CopyStatus_STAGED {