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)
The
/:requestId/resultroute (line 147-150) callsres.download(job.gcodes[0])which streams the file to the client, but unlike in the synchronous/sliceroute, 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)