Ensure bundle removal is atomic
This makes bundle removal atomic by first renaming the bundle and working directories to a hidden path before removing the underlying directories. Closes #2567 Closes #2327 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -145,6 +145,10 @@ func (m *TaskManager) loadExistingTasks(ctx context.Context) error {
|
||||
continue
|
||||
}
|
||||
ns := nsd.Name()
|
||||
// skip hidden directories
|
||||
if len(ns) > 0 && ns[0] == '.' {
|
||||
continue
|
||||
}
|
||||
log.G(ctx).WithField("namespace", ns).Debug("loading tasks in namespace")
|
||||
if err := m.loadTasks(namespaces.WithNamespace(ctx, ns)); err != nil {
|
||||
log.G(ctx).WithField("namespace", ns).WithError(err).Error("loading tasks in namespace")
|
||||
|
||||
Reference in New Issue
Block a user