On Wed, Feb 8, 2012 at 5:12 AM, Greg Slodkowicz <[email protected]> wrote: > Hi all, > I'm working on a Pyramid application where I need to serve plots > generated on the fly with an external application (R). For now I have > R drop a png file with the plot to ./static but I'm having trouble > disposing of it once it's no longer needed. Is there any way to have a > session cleanup hook? I would guess the solution would involve event > handlers somehow but I couldn't find anything appropriate in the > documentation.
Do you need them deleted as soon as the session expires? If not, I guess the easiest way would be to set up a cron job which would delete all the files older than something every day/hour/whatever. Or if it's a small app that won't have to scale, you could even do it in some view callable (not very elegant though). -- Juliusz Gonera -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
