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

staticPath logging #345

Closed
isaac-florence opened this issue Oct 21, 2022 · 1 comment
Closed

staticPath logging #345

isaac-florence opened this issue Oct 21, 2022 · 1 comment

Comments

@isaac-florence
Copy link

Is it possible to add a function before or after a staticPath file has been served? For instance to facilitate logging of what files have been server (conscious I may be missing something obvious, my apologies)

@wch
Copy link
Collaborator

wch commented Oct 25, 2022

Sorry, there isn't a way to do that with staticPath. The staticPath functionality was added for performance reasons -- it serves the files on a separate thread from the main R thread, and calling an R function before serving the files would require synchronization with the R thread, which would add complexity and slow things down.

If you want to do logging for serving files, you can do it by not using staticPath, and instead have your call method handle file requests in R.

@wch wch closed this as completed Oct 25, 2022
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

2 participants