Migrate task directory
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -128,3 +128,16 @@ func (l *TaskList) Delete(ctx context.Context, id string) {
|
||||
delete(tasks, id)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *TaskList) IsEmpty() bool {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
|
||||
for ns := range l.tasks {
|
||||
if len(l.tasks[ns]) > 0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user