Skip to content

Feature require: Safely clean up empty queue files #45

@hongweipeng

Description

@hongweipeng

Currently when the queue is empty, even after a long time, the file still takes up disk space. We need similar functionality:

func (d *diskQueue) CleanupIfQueueEmpty() error {
    d.Lock()
    defer d.Unlock()
    if d.Depth() ==  0 {
        return d.Empty()
    }
    return nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions