Skip to content

feat(slicing): improves saving and cleanup of async slicing jobs #45

@AFKFelix

Description

@AFKFelix

The /:requestId/result route (line 147-150) calls res.download(job.gcodes[0]) which streams the file to the client, but unlike in the synchronous /slice route, the async route never cleans up the working directory (workdir) after the file has been downloaded. Cleanup only happens when the client explicitly calls DELETE or when the retention timer fires. While this is by design (users may download multiple times), it means that if the client never calls DELETE and the retention period is long, disk usage can grow unboundedly under high load. This should be clearly documented (it is mentioned in the README but only briefly), and/or automatic cleanup should be triggered after successful download (or at least documented more clearly in the API).

Originally posted by @Copilot in #43 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions