Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with cleaning tmp files with timeouts options #192

Open
geoffreyaldebert opened this issue Jul 18, 2020 · 0 comments
Open

Problem with cleaning tmp files with timeouts options #192

geoffreyaldebert opened this issue Jul 18, 2020 · 0 comments

Comments

@geoffreyaldebert
Copy link

geoffreyaldebert commented Jul 18, 2020

When a file is downloaded by plunger, it is first stored in "/tmp" folder in a subfolder called "plunger_XXXX".

I think I noticed that when the configuration options of timeouts "activity" and "download" are not sufficient for downloading file, plunger does not remove automatically the subfolder "plunger_XXXX".

So there is persistent data that remains in /tmp folder.

Is there a possibility to clean that automatically from plunger package instead of cleaning /tmp folder manually ?

I may not understand but it seems that in lib/http/download.js :

    pipe(
      token.response,
      computeDigest(options.digestAlgorithm, onDigest),
      bytesLimit(options.maxDownloadSize),
      fs.createWriteStream(filePath),
      err => {
        clearTimeout(downloadTimeout)
        clearTimeout(activityTimeout)

        if (err) {
          token.response.destroy()
          return reject(err)
        }

        resolve({filePath, digest, fileSize})
      }
    )
  })
}

clearTimeout does not remove temp files ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant